References to linker script symbols become undefined
Stephen Casner
casner@acm.org
Wed Apr 15 06:48:01 GMT 2020
Nevermind. I have found the bug causing symbols in pdp11 output to be
marked as undefined.
I did find the BFD internals document, but that only helped a little.
It might be a good idea to have a link to that document on the
binutils web page.
-- Steve
On Sun, 12 Apr 2020, Stephen Casner wrote:
> I'd appreciate some pointers from any ld/bfd experts reading this
> list. I'm would like to fix the several unexpected failures that
> occur when running ld testsuite for the pdp11-aout target. I have
> learned that these unexpected failures have been unattended for a long
> time.
>
> Some of the test failures can be fixed easily, but there are several
> caused by a problem that appears to be a real bug for the pdp11-aout
> target: when an assembler source file references a symbol defined in a
> linker script, that symbol is marked as undefined in the output file.
> This is true for both absolute symbols and symbols relocated to any of
> the text, data or bss output sections.
>
> For example, the default linker script ld/ldscripts/pdp11.x defines
> several symbols including _etext, _edata, _end. Those symbols are
> listed in the symbol table with their correct values. However, if the
> source file references any of them they become undefined while any
> that are not referenced are still defined as before.
>
> I don't know my way around the ld/bfd source well enough to know where
> the resolution of these symbols should be done, so I'd appreciate some
> pointers. I'd be happy to RTFM if there is one (an internals doc like
> the one for gcc?) or to UTSL if you can help narrow down the set of
> files. Suggestions for debugging techniques (debug or trace options?)
> would also be helpful. Thanks.
>
> -- Steve
More information about the Binutils
mailing list