Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.utils.bug > #2270 > unrolled thread
| Started by | <John.Adriaan@BigPond.com> |
|---|---|
| First post | 2019-12-23 23:28 +1100 |
| Last post | 2019-12-23 23:28 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.utils.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
ld: Neither "FILL(x);" nor "{ }>Memory = x" allow symbols <John.Adriaan@BigPond.com> - 2019-12-23 23:28 +1100
| From | <John.Adriaan@BigPond.com> |
|---|---|
| Date | 2019-12-23 23:28 +1100 |
| Subject | ld: Neither "FILL(x);" nor "{ }>Memory = x" allow symbols |
| Message-ID | <mailman.1306.1577107079.1979.bug-gnu-utils@gnu.org> |
REF: GNU ld (GNU Tools for Arm Embedded Processors 8-2019-q3-update)
2.32.0.20190703
HOST: Microsoft Windows [Version 10.0.18362.535]
Given the following definitions in a linker script:
_Page = DEFINED(_Spansion) ? 0x200 : 0x0100; /* Spansion has larger pages
*/
_Type = DEFINED(_Spansion) ? 0x53 : 0x46; /* 'S'pansion or 'F'lash */
_Rsvd = DEFINED(_DEBUG) ? 0x52737664 : ~0; /* Literally "Rsvd" */
Then the following lines all work:
. = ALIGN(_Page);
BYTE(_Type);
FILL(0x52737664);
FILL(0x52<<24 | 0x73<<16 | 0x76<<8 | 0x64<<0); /* Complicated expression! */
.section : { } >rom = 0x52737664
However, either of the following lines crash the linker:
FILL(_Rsvd);
.section : { } >rom = _Rsvd
Even if I simplify the definition to:
_Rsvd = 0x52737664; /* Literally "Rsvd" */
I still get the same errors.
These give (depending on which manufacturer's Eclipse IDE I use) either:
collect2.exe: error: ld returned 5 exit status (regardless of whether I
select "-Wl,--verbose" or not)
or
arm-none-eabi/bin/ld.exe: bfd_link_hash_lookup failed: no error (It's the
"no error" part that I like the most!)
It seems like the Fill algorithm doesn't like to use symbols.
Thanks for any feedback on this,
John Adriaan
Back to top | Article view | gnu.utils.bug
csiph-web