[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/10965] New: cross-compiled ld doesn't change string addresses
From: |
lupuroshu at yahoo dot com |
Subject: |
[Bug ld/10965] New: cross-compiled ld doesn't change string addresses |
Date: |
15 Nov 2009 18:43:53 -0000 |
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 ld/10965] New: cross-compiled ld doesn't change string addresses,
lupuroshu at yahoo dot com <=
- [Bug ld/10965] cross-compiled ld doesn't change string addresses, lupuroshu at yahoo dot com, 2009/11/15
- [Bug ld/10965] cross-compiled ld doesn't change string addresses, hjl dot tools at gmail dot com, 2009/11/15
- [Bug ld/10965] cross-compiled ld doesn't change string addresses, hjl dot tools at gmail dot com, 2009/11/15
- [Bug ld/10965] cross-compiled ld doesn't change string addresses, lupuroshu at yahoo dot com, 2009/11/15
- [Bug ld/10965] cross-compiled ld doesn't change string addresses, lupuroshu at yahoo dot com, 2009/11/16
- [Bug ld/10965] cross-compiled ld doesn't change string addresses, lupuroshu at yahoo dot com, 2009/11/16
- [Bug ld/10965] cross-compiled ld doesn't change string addresses, hjl dot tools at gmail dot com, 2009/11/16