[prev in list] [next in list] [prev in thread] [next in thread] 

List:       binutils
Subject:    Re: ELF linker is broken
From:       Alan Modra <amodra () bigpond ! net ! au>
Date:       2005-01-31 23:28:17
Message-ID: 20050131231617.GJ11595 () bubble ! modra ! org
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic