@@ -59,6 +59,7 @@ jiffies = jiffies_64;
59
59
* garbage.)
60
60
*/
61
61
62
+ #ifdef CONFIG_VECTORS_OFFSET
62
63
#define SECTION_VECTOR(sym, section, addr, max_prevsec_size, prevsec) \
63
64
section addr : AT((MIN(LOADADDR(prevsec) + max_prevsec_size, \
64
65
LOADADDR(prevsec) + SIZEOF(prevsec)) + 3 ) & ~ 3 ) \
@@ -68,6 +69,11 @@ jiffies = jiffies_64;
68
69
*(section) \
69
70
sym ## _end = ABSOLUTE(.); \
70
71
}
72
+ #else
73
+ #define SECTION_VECTOR(section, addr) \
74
+ . = addr; \
75
+ *(section)
76
+ #endif
71
77
72
78
/*
73
79
* Mapping of input sections to output sections when linking.
@@ -85,6 +91,37 @@ SECTIONS
85
91
{
86
92
/* The HEAD_TEXT section must be the first section! */
87
93
HEAD_TEXT
94
+
95
+ #ifndef CONFIG_VECTORS_OFFSET
96
+ . = ALIGN(PAGE_SIZE);
97
+ _vecbase = .;
98
+
99
+ SECTION_VECTOR (.WindowVectors.text, WINDOW_VECTORS_VADDR)
100
+ #if XCHAL_EXCM_LEVEL >= 2
101
+ SECTION_VECTOR (.Level2InterruptVector.text, INTLEVEL2_VECTOR_VADDR)
102
+ #endif
103
+ #if XCHAL_EXCM_LEVEL >= 3
104
+ SECTION_VECTOR (.Level3InterruptVector.text, INTLEVEL3_VECTOR_VADDR)
105
+ #endif
106
+ #if XCHAL_EXCM_LEVEL >= 4
107
+ SECTION_VECTOR (.Level4InterruptVector.text, INTLEVEL4_VECTOR_VADDR)
108
+ #endif
109
+ #if XCHAL_EXCM_LEVEL >= 5
110
+ SECTION_VECTOR (.Level5InterruptVector.text, INTLEVEL5_VECTOR_VADDR)
111
+ #endif
112
+ #if XCHAL_EXCM_LEVEL >= 6
113
+ SECTION_VECTOR (.Level6InterruptVector.text, INTLEVEL6_VECTOR_VADDR)
114
+ #endif
115
+ SECTION_VECTOR (.DebugInterruptVector.literal, DEBUG_VECTOR_VADDR - 4 )
116
+ SECTION_VECTOR (.DebugInterruptVector.text, DEBUG_VECTOR_VADDR)
117
+ SECTION_VECTOR (.KernelExceptionVector.literal, KERNEL_VECTOR_VADDR - 4 )
118
+ SECTION_VECTOR (.KernelExceptionVector.text, KERNEL_VECTOR_VADDR)
119
+ SECTION_VECTOR (.UserExceptionVector.literal, USER_VECTOR_VADDR - 4 )
120
+ SECTION_VECTOR (.UserExceptionVector.text, USER_VECTOR_VADDR)
121
+ SECTION_VECTOR (.DoubleExceptionVector.literal, DOUBLEEXC_VECTOR_VADDR - 48 )
122
+ SECTION_VECTOR (.DoubleExceptionVector.text, DOUBLEEXC_VECTOR_VADDR)
123
+ #endif
124
+
88
125
TEXT_TEXT
89
126
VMLINUX_SYMBOL(__sched_text_start) = .;
90
127
*(.sched.literal .sched.text)
@@ -132,6 +169,7 @@ SECTIONS
132
169
. = ALIGN(16 );
133
170
__boot_reloc_table_start = ABSOLUTE(.);
134
171
172
+ #ifdef CONFIG_VECTORS_OFFSET
135
173
RELOCATE_ENTRY(_WindowVectors_text,
136
174
.WindowVectors.text);
137
175
#if XCHAL_EXCM_LEVEL >= 2
@@ -164,6 +202,7 @@ SECTIONS
164
202
.DoubleExceptionVector.text);
165
203
RELOCATE_ENTRY(_DebugInterruptVector_text,
166
204
.DebugInterruptVector.text);
205
+ #endif
167
206
#if defined(CONFIG_SMP)
168
207
RELOCATE_ENTRY(_SecondaryResetVector_text,
169
208
.SecondaryResetVector.text);
@@ -186,6 +225,7 @@ SECTIONS
186
225
. = ALIGN(4 );
187
226
.dummy : { LONG(0 ) }
188
227
228
+ #ifdef CONFIG_VECTORS_OFFSET
189
229
/* The vectors are relocated to the real position at startup time */
190
230
191
231
SECTION_VECTOR (_WindowVectors_text,
@@ -277,6 +317,7 @@ SECTIONS
277
317
278
318
. = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3 ) & ~ 3 ;
279
319
320
+ #endif
280
321
#if defined(CONFIG_SMP)
281
322
282
323
SECTION_VECTOR (_SecondaryResetVector_text,
0 commit comments