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]

ld thinks '1.o' different from './1.o'?


  The linker script:
-----------------------------
OUTPUT_ARCH(mips) 
SECTIONS
{
	.text 0x80040000: {  1.o(.text) 2.o(.text)  *(.text) *(.rodata*) }
	.data : {  *(.data) *(.sdata)   }
	.sbss : {  *(.sbss) *(.scommon) }
	.bss :  {  *(.bss) *(COMMON) }
}


  building:
-----------------------------
mips-elf-ld -EL -T link.xn -r -o a.out ./1.o ./2.o
./1.o(.text+0x0): In function `f1':
: multiple definition of `f1'
1.o(.text+0x0): first defined here
./2.o(.text+0x0): In function `f2':
: multiple definition of `f2'
2.o(.text+0x0): first defined here

Linking is successful if the options are changed to:
----------------------------------------------------
mips-elf-ld -EL -T link.xn -r -o a.out 1.o 2.o

Does `ld' thinks `1.o' different from `./1.o' ?



Best Regards,
PRC
2008/3/13


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