This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ELF linker is broken
On Mon, Jan 31, 2005 at 01:22:03PM -0800, H. J. Lu wrote:
> I am enclosing a testcase here. I saw the same problem on ia32, ia64
> and x86_64:
Thanks. That makes it clear what is happening.
/* The special symbol _DYNAMIC is always set to the start of the
.dynamic section. This call occurs before we have processed the
symbols for any dynamic object, so we don't have to worry about
overriding a dynamic definition. We could set _DYNAMIC in a
linker script, but we only want to define it if we are, in fact,
creating a .dynamic section. We don't want to define it if there
is no .dynamic section, since on some ELF platforms the start up
code examines it to decide how to initialize the process. */
bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_DYNAMIC", BSF_GLOBAL, s, 0, NULL, FALSE,
get_elf_backend_data (abfd)->collect, &bh)))
return FALSE;
The comment 'before we have processed the symbols for any dynamic
object' is no longer true.
--
Alan Modra
IBM OzLabs - Linux Technology Centre