This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

linker --unique option error


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'



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]