AIX 5.1 objcopy copy problem in 64 bit mode.
Hi, I'm having a situation where gnu objcopy fails badly when using it with 64 bit compiles under AIX 5.1: What I'm doing is to hide some symbols on g++ compiled code: g++ -maix64 -c -pthread -o temp/AIX/test.o test.cpp mv temp/AIX/test.o temp/AIX/to_be_fixed.o ld -b64 -r temp/AIX/to_be_fixed.o `g++ -maix64 --print-file-name=libstdc++.a` -o temp/AIX/test.o rm temp/AIX/to_be_fixed.o mv temp/AIX/test.o temp/AIX/to_be_fixed.o; objcopy -G main temp/AIX/to_be_fixed.o temp/AIX/test.o; rm temp/AIX/to_be_fixed.o When I link with test.o using native AIX linker (with gcc as frontend) I get: gcc -maix64 -lpthread -o test test.o ld: 0711-590 SEVERE ERROR: Object test.o cannot be processed. The length field at the beginning of the string table is invalid. collect2: ld returned 12 exit status make: *** [all] Error 1 I have tried to temporarily make some modications and exclude objcopy from the build and suddenly everything starts to work perfectly. objcopy therefore must generate bad code in 64 bit mode since it also works correctly as 32 bit code. I have downloaded binutils 2.16.1 and have configured it with "./configure --enable-64-bit-bfd" Are there anything else I could try? What I'm trying is to make global symbols in the object file into local symbols. Thanks in advance. -- Henrik ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
Re: BUG elf32-i386 R_386_PC32 done wrong
doctor electron <[EMAIL PROTECTED]> writes: > As author of the HotBasic compiler for Windows, in porting same > to Linux, I find that ld does not properly link relative > relocations (R_386_PC32) in correct elf32-i386 .o files. GNU ld is correct according to the ELF ABI Processor Supplement for i386 Processors. In typical use, the .o file will contain a 0xfffc in the four bytes affected by R_386_PC32. R_386_PC32 is defined to add the PC relative offset from the start of the 4 byte field to the existing contents of the 4 byte field. Ian ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/2809] New: ld incorrect applies LTOFF22X/LDXMOV relocations
ld on ia64 applies LTOFF22X and LDXMOV relocations at linktime, voilating the ABI. The IA64 ABI description here http://refspecs.freestandards.org/elf/IA64-SysV-psABI.pdf states in Section 5.2.1 - Linktime and Runtime Addresses: "Since there is no fixed address relationship at runtime among segments created at linktime, the constant value must be calculated based on the segment containing the address in question." By applying these relocation in ld rather than the dynamic linker it assumes a fixed address relationship at runtime. ie. the constant value is not calculated based on the segment containing the address. Executing code with these relocations applied and loading segments with a non-fixed offset (as you should be able to do) causes crashes and other random behaviour. These relocations seem to be related to the "--relax" option of ld. If ld can't/won't preserve these relocations to be done at load time, is there at least some way to turn off these relaxations? -- Summary: ld incorrect applies LTOFF22X/LDXMOV relocations Product: binutils Version: 2.16 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: cgray at cse dot unsw dot edu dot au CC: bug-binutils at gnu dot org GCC build triplet: ia64-*-* GCC host triplet: ia64-*-linux GCC target triplet: ia64-*-* http://sourceware.org/bugzilla/show_bug.cgi?id=2809 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils