bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/3223] ld fails to link correct variables from linker script.


From: hjl at lucon dot org
Subject: [Bug ld/3223] ld fails to link correct variables from linker script.
Date: 21 Sep 2006 23:06:19 -0000

------- Additional Comments From hjl at lucon dot org  2006-09-21 23:06 -------
Linker behavior is changed. Empty output section in the linker script no
longer changes the output layout. Unless you change DOT with empty output
section, the output layout will be the same as if empty output section
doesn't exist in the linker script. To make the output layout depend on
empty output section, you can add

. = ADDR (.data) + SIZEOF (.data);

after empty output section:

address@hidden empty-8]$ cat foo.t
SECTIONS
{
  .text 0x00000000: { *(.text) }
  .data 0x20000000:
  {
    __data_start = . ;
    *(.data)
  }
  . = ADDR (.data) + SIZEOF (.data);
   _edata = .;
  /DISCARD/ : { *(.*) }
}
address@hidden empty-8]$ make
as   -o foo.o foo.s
./ld -Tfoo.t -o foo foo.o
nm foo | grep __data_start
0000000020000000 A __data_start
nm foo | grep _edata
0000000020000000 A _edata
address@hidden empty-8]$



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3223

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]