[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2.6.2 postponed .. (was Re: [Gcl-devel] RE ld from 2.14.90.0.8 puts
From: |
Peter Wood |
Subject: |
Re: 2.6.2 postponed .. (was Re: [Gcl-devel] RE ld from 2.14.90.0.8 puts no value into undefined symbols) |
Date: |
Sun, 29 Feb 2004 14:32:45 +0100 |
User-agent: |
Mutt/1.4i |
On Fri, Feb 27, 2004 at 03:20:29PM -0500, Camm Maguire wrote:
> Alas, I tested, and this is not the problem. This define did not
> change between .7 and .8.
No. My apologies. A combination of 'cut and paste' and gross haste
and carelessness on my part. I guess I should have posted to this
thread:
http://mail.gnu.org/archive/html/gcl-devel/2004-02/msg00261.html
:-(
>
> It would be wonderful if this could be done in a robust fashion immune
> to further binutils development. Advice appreciated.
>
I don't know if it's more robust, but I would like to point out a
potential alternative to the fix you found. I have tested properly
(on my own version of GCL) this time, and it does work.
You can get ld to output a linker map by giving it -Map <filename>.
All symbols (including those in the plt) are listed with their
addresses. If you are willing to parse this map file and extract the
symbols and addresses, you can build your symbol table from this file
instead of raw_gcl.
I am doing all this from lisp, (with a new fasload) since I want to
avoid BFD (and any other external libraries) as far as possible. But
I don't see why you couldn't do the same in C.
bash-2.04$ objdump -x unixport/raw_gcl | grep -e strcpy
00000000 F *UND* 0000008b strcpy@@GLIBC_2.0
bash-2.04$ objdump -x unixport/saved_gcl | grep -e strcpy
00000000 F *UND* 0000008b strcpy@@GLIBC_2.0
bash-2.04$ grep -e strcpy unixport/raw_gcl_map.txt
0x08049638 strcpy@@GLIBC_2.0
bash-2.04$ ./unixport/saved_gcl
NaCl (NaCl ain't Common lisp)
Licensed under GNU LGPL
>(setf *print-base* 16)
10
>(gethash 'led::|strcpy| led::*system-symbol-table*)
8049638
T
>(bye)
Bye.
bash-2.04$ /home/prw/binutils-1077978503/bin/ld --version
GNU ld version 2.15.90 20040228
Regards,
Peter