This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
ld errors -- wrong output section for SDAREL target
- To: GNU binutils <binutils at sourceware dot cygnus dot com>
- Subject: ld errors -- wrong output section for SDAREL target
- From: Momchil Velikov <velco at fadata dot bg>
- Date: Sat, 18 Mar 2000 23:28:03 +0200
Hi,
gcc-2.92.2
ld, gas: latest CVS
I get zillions of errors of the following kind:
/usr/local/powerpc-svr4/bin/ld: /home/velco/os/boot/powerpc/boot.o: The
target (stdout) of a R_PPC_SDAREL16 relocation is in the wrong output
section (.data)
/usr/local/powerpc-svr4/bin/ld: /home/velco/os/boot/powerpc/boot.o: The
target (dmon_device) of a R_PPC_SDAREL16 relocation is in the wrong
output section (.bss)
/usr/local/powerpc-svr4/bin/ld: /home/velco/os/boot/powerpc/boot.o: The
target (<local symbol>) of a R_PPC_SDAREL16 relocation is in the wrong
output section (.data)
All the objects were compiled with the -msdata option. The relevant
portion of the
ld script is:
. = ALIGN(0x1000);
.data :
{ *(.data)
*(.gnu.linkonce.d*)
_SDA_BASE_ = . + 32768;
PROVIDE(__ctors_start = .);
*(.ctors)
PROVIDE(__ctors_end = .);
*(.sdata)
}
_edata = .;
PROVIDE (edata = .);
.bss : { *(.sbss) *(.bss) *(COMMON) }
_end = . ;
PROVIDE (end = .);
Yep, it's somewhat unusual. The reason is the bogus bootloader (Apple OF
1.0.5)
-- it initializes only .text, .data and .bss sections.
Does anybody have an idea how to cope with this situation ?
Is is possible for the linker to relocate against the value of
_SDA_BASE_ ?
Regards,
-velco