------- 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:

[EMAIL PROTECTED] empty-8]$ cat foo.t
SECTIONS
{
  .text 0x00000000: { *(.text) }
  .data 0x20000000:
  {
    __data_start = . ;
    *(.data)
  }
  . = ADDR (.data) + SIZEOF (.data);
   _edata = .;
  /DISCARD/ : { *(.*) }
}
[EMAIL PROTECTED] 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
[EMAIL PROTECTED] 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.


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to