public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* References to linker script symbols become undefined
@ 2020-04-12 23:34 Stephen Casner
  2020-04-15  6:48 ` Stephen Casner
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Casner @ 2020-04-12 23:34 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: References to linker script symbols become undefined
  2020-04-12 23:34 References to linker script symbols become undefined Stephen Casner
@ 2020-04-15  6:48 ` Stephen Casner
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Casner @ 2020-04-15  6:48 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-15  6:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-12 23:34 References to linker script symbols become undefined Stephen Casner
2020-04-15  6:48 ` Stephen Casner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).