Hi , I tried to send the testcase(.tgz) with the mail (object files but it is 4 MB in size and the mail server on your side is not allowing it).
Please , look at the problem description below. If it is a known problem . Let me know a work-around. I am trying to find a way to make the testcase available to you (through anonymous FTP). I currently don't know how we can do it from our company's firewall. thanks & Regards Kshitiz -----Original Message----- From: Kshitiz JAIN [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 28, 2005 3:24 PM To: [EMAIL PROTECTED] Cc: Kshitiz JAIN; Sandeep KHURANA Subject: Problem with gnu-ld Hi I was trying to build a Linux application using the gnu ld using a linker script. In the linker script I use the MEMORY to configure memory, the script was used to generated binary for pc running RHLinux 3.0. (The .o and .lib files used are attached in tar with mail) when I use without the MEMORY definition in the linker script (attached linker script Memory definition commented). I get a correct binary see below (correct value of vaddr and off for LOADED segments) ================================================================================= [EMAIL PROTECTED] ld-bug]$ ld crt1.o crti.o crtbegin.o 1-1.o libc.a libgcc.a libgcc_eh.a -T script.ld [EMAIL PROTECTED] ld-bug]$ objdump -p a.out a.out: file format elf32-i386 Program Header: LOAD off 0x00000000 vaddr 0x00001000 paddr 0x00001000 align 2**12 filesz 0x000592dc memsz 0x000592dc flags r-x LOAD off 0x000592e0 vaddr 0x0005b2e0 paddr 0x0005b2e0 align 2**12 filesz 0x00000c84 memsz 0x000019b4 flags rw- NOTE off 0x000000b4 vaddr 0x000010b4 paddr 0x000010b4 align 2**2 filesz 0x00000020 memsz 0x00000020 flags r-- STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2 filesz 0x00000000 memsz 0x00000000 flags rw- ================================================================================= when I uncomment the MEMORY definition , (I get incorrect value of off,vaddr). (The linux elf loader loads the program header at vaddr - off , which lies in an inaccesible user space region in this case) ================================================================================= [EMAIL PROTECTED] ld-bug]$ ld crt1.o crti.o crtbegin.o 1-1.o libc.a libgcc.a libgcc_eh.a -T script.ld [EMAIL PROTECTED] ld-bug]$ objdump -p a.out a.out: file format elf32-i386 Program Header: LOAD off 0x00001000 vaddr 0x00001000 paddr 0x00001000 align 2**12 filesz 0x00059ea4 memsz 0x0005abd4 flags rwx NOTE off 0x00001000 vaddr 0x00001000 paddr 0x00001000 align 2**2 filesz 0x00000020 memsz 0x00000020 flags r-- STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2 filesz 0x00000000 memsz 0x00000000 flags rw- ================================================================================= the details of environment are given below ================================================================================= [EMAIL PROTECTED] ld-bug]$ ld --version GNU ld version 2.14.90.0.4 20030523 Copyright 2002 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. [EMAIL PROTECTED] ld-bug]$ gcc --version gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-47) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [EMAIL PROTECTED] ld-bug]$ uname -a Linux del218lxld 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 i686 i386 GNU/Linux ================================================================================== Please , let me know if any more information is required. Any information to sort this thing out will be helpful. Thanks & Regards Kshitiz _______________________________________________ bug-binutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-binutils
