Host system: Windows XP SP3, with Cygwin installed Compiler: gcc 4.4.2, cross-compiler (configured with ./configure --target=i586-elf --prefix=/usr/cross --disable-nls --enable-languages=c,c++ --without-headers) Binutils: 2.20 (configured with ./configure --target=i586-elf --prefix=/usr/cross --disable-nls)
When compiling some OS development examples, I found that ld does not change the addresses of constant strings (inside .rodata) after linking multiple object files with a script. Attached is an example (C source, linker script and assembler file), with nasm, gcc and ld included. Steps to reproduce: - unpack archive - run build.bat - examine the resulting krnl.lst (created with objdump, I kept it in the archive for convenience) - inside <main>, look at the addresses of strings passed to memcpy (in my case, they are 0x8048160 and 0x80481a0) This does not reproduce with MinGW (binutils 2.20). -- Summary: cross-compiled ld doesn't change string addresses Product: binutils Version: 2.20 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: lupuroshu at yahoo dot com CC: bug-binutils at gnu dot org,lupuroshu at yahoo dot com http://sourceware.org/bugzilla/show_bug.cgi?id=10965 ------- 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