linker --unique option error
Mon Jan 14 19:56:00 GMT 2008

Hi all,

I guess this is a linker bug.
When i link two object files with --unique=.text, linker emit error 
message indicating it does not know how to place
.text.* section, what linking script has specifed. 
The following is execute flow. "[/home/jessy/program] $" is my shell 

[/home/jessy/program] $ cat 1.s
.long 0xAAAAAAAA
[/home/jessy/program] $ cat 2.s
.long 0xBBBBBBBB
[/home/jessy/program] $ cat my.ld
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",  "elf64-x86-64")
  ram : ORIGIN = 0x00000000, LENGTH = 2048M
  rom : ORIGIN = 0x80000000, LENGTH = 2048M
  . = 0;
  .text :
    *(.text .text.*)
  } > rom
  .data :
    *(.data .data.*)
  } > ram
[/home/jessy/program] $ as 1.s -o 1.o
[/home/jessy/program] $ as 2.s -o 2.o
[/home/jessy/program] $ ld 1.o 2.o -Tmy.ld -unique=.text
ld: error: no memory region specified for loadable section `.text'

More information about the Binutils mailing list