linker --unique option error

bjgnu@sunnorth.com.cn bjgnu@sunnorth.com.cn
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 
prompt. 

[/home/jessy/program] $ cat 1.s
.text
.long 0xAAAAAAAA
[/home/jessy/program] $ cat 2.s
.text
.long 0xBBBBBBBB
[/home/jessy/program] $ cat my.ld
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",  "elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
MEMORY
{
  ram : ORIGIN = 0x00000000, LENGTH = 2048M
  rom : ORIGIN = 0x80000000, LENGTH = 2048M
}
SECTIONS
{
  . = 0;
  .text :
  {
    *(.text .text.*)
  } > rom
  .data :
  {
    *(.data .data.*)
    *(.bss)
  } > 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