Skip to content

Commit b002503

Browse files
authored
Enable use of --text-section-literals in Xtensa port (#485)
Patch submitted by customer on forums here: https://forums.freertos.org/t/cannot-compile-xtensa-port-assembly-with-text-section-literals/14838
1 parent 40c37bd commit b002503

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

portable/ThirdParty/XCC/Xtensa/xtensa_context.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ NOERROR: .error "C preprocessor needed for this file: make sure its filename\
6262
#endif
6363

6464
.text
65+
.literal_position
6566

6667
/*******************************************************************************
6768

portable/ThirdParty/XCC/Xtensa/xtensa_vectors.S

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@
306306
.global _xt_panic
307307
.type _xt_panic,@function
308308
.align 4
309+
.literal_position
309310

310311
_xt_panic:
311312
#ifdef XT_SIMULATOR
@@ -386,6 +387,7 @@ Debug Exception.
386387
.section .DebugExceptionVector.text, "ax"
387388
.global _DebugExceptionVector
388389
.align 4
390+
.literal_position
389391

390392
_DebugExceptionVector:
391393

@@ -424,6 +426,7 @@ Double exceptions are not a normal occurrence. They indicate a bug of some kind.
424426
.section .DoubleExceptionVector.text, "ax"
425427
.global _DoubleExceptionVector
426428
.align 4
429+
.literal_position
427430

428431
_DoubleExceptionVector:
429432

@@ -447,6 +450,7 @@ Kernel Exception (including Level 1 Interrupt from kernel mode).
447450
.section .KernelExceptionVector.text, "ax"
448451
.global _KernelExceptionVector
449452
.align 4
453+
.literal_position
450454

451455
_KernelExceptionVector:
452456

@@ -478,6 +482,7 @@ User Exception (including Level 1 Interrupt from user mode).
478482
.global _UserExceptionVector
479483
.type _UserExceptionVector,@function
480484
.align 4
485+
.literal_position
481486

482487
_UserExceptionVector:
483488

@@ -1032,6 +1037,8 @@ _xt_lowint1:
10321037
.global _Level2Vector
10331038
.type _Level2Vector,@function
10341039
.align 4
1040+
.literal_position
1041+
10351042
_Level2Vector:
10361043
wsr a0, EXCSAVE_2 /* preserve a0 */
10371044
call0 _xt_medint2 /* load interrupt handler */
@@ -1103,6 +1110,8 @@ _xt_medint2_exit:
11031110
.global _Level3Vector
11041111
.type _Level3Vector,@function
11051112
.align 4
1113+
.literal_position
1114+
11061115
_Level3Vector:
11071116
wsr a0, EXCSAVE_3 /* preserve a0 */
11081117
call0 _xt_medint3 /* load interrupt handler */
@@ -1174,6 +1183,8 @@ _xt_medint3_exit:
11741183
.global _Level4Vector
11751184
.type _Level4Vector,@function
11761185
.align 4
1186+
.literal_position
1187+
11771188
_Level4Vector:
11781189
wsr a0, EXCSAVE_4 /* preserve a0 */
11791190
call0 _xt_medint4 /* load interrupt handler */
@@ -1244,6 +1255,8 @@ _xt_medint4_exit:
12441255
.global _Level5Vector
12451256
.type _Level5Vector,@function
12461257
.align 4
1258+
.literal_position
1259+
12471260
_Level5Vector:
12481261
wsr a0, EXCSAVE_5 /* preserve a0 */
12491262
call0 _xt_medint5 /* load interrupt handler */
@@ -1314,6 +1327,8 @@ _xt_medint5_exit:
13141327
.global _Level6Vector
13151328
.type _Level6Vector,@function
13161329
.align 4
1330+
.literal_position
1331+
13171332
_Level6Vector:
13181333
wsr a0, EXCSAVE_6 /* preserve a0 */
13191334
call0 _xt_medint6 /* load interrupt handler */

0 commit comments

Comments
 (0)