This repository was archived by the owner on Jan 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,17 @@ SECTIONS
58
58
_edata = .;
59
59
} > RAM AT > FLASH
60
60
61
+ /* fake output .got section */
62
+ /* Dynamic relocations are unsupported. This section is only used to detect
63
+ relocatable code in the input files and raise an error if relocatable code
64
+ is found */
65
+ .got :
66
+ {
67
+ _sgot = .;
68
+ KEEP(*(.got .got.*));
69
+ _egot = .;
70
+ } > RAM AT > FLASH
71
+
61
72
/* The heap starts right after the .bss + .data section ends */
62
73
_sheap = _edata;
63
74
@@ -111,3 +122,10 @@ Set '_stext' to an address greater than '_einterrupts'");
111
122
ASSERT (_stext < ORIGIN(FLASH ) + LENGTH (FLASH), "
112
123
The '.text' section must be placed inside the FLASH memory
113
124
Set '_stext' to an address smaller than 'ORIGIN (FLASH) + LENGTH (FLASH)");
125
+
126
+ ASSERT (_sgot == _egot, "
127
+ .got section detected in the input files. Dynamic relocations are not
128
+ supported. If you are linking to C code compiled using the `gcc` crate
129
+ then modify your build script to compile the C code _without_ the
130
+ -fPIC flag. See the documentation of the `gcc ::Config.fpic` method for
131
+ details.");
You can’t perform that action at this time.
0 commit comments