This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
question of ld
- From: Shiyi Ma <syma at avanticorp dot com>
- To: binutils at sources dot redhat dot com
- Date: Thu, 16 May 2002 17:16:20 +0800
- Subject: question of ld
- Organization: Avanti+Synopsys
Now I am doing a project under SunOS and Linux. And want to
build a lib file which is combined of many object files. In the lib
file, there are many symbols which should not be seen. So I want to
strip some symols from the lib file.
Under SunOS platform, there are some ld's flags to touch my
goal.Ther are : -z muldefs -B reduce -M mapfile -B eliminate -z
redlocsym. ( mapfile includes some symbols what I need ). And there are
flags -z allextract and -z defaultextract to extract some lib files
which include some object files. (These lib files are the results from
some other source code and will make up of the lib file which I point
out and I really need)
I want to know which flags can do the same function under Linux
just as the flags which I have pointed out under SunOS.
In fact, I have tried some flags and failed. At first, I try to
use -s to omit all symbols, but there are about half symbols left( for
example : 20000->10000). Then I use -x and the result is the same as -s.
What's the difference between the two flag? I also tried
--retain-symbols-file FILE, --version-script FILE and -R FILE, but I
don't
know correct file format and failed. Who can tell me the right FILE
format?
Any answer is welcome.
Thanks in advance.
--
Milkyway R&D
ShiYi_Ma
Software Engineer
Avant! Microelectronics (Shanghai) Co., Ltd.
Tel: +86-21-62837026*532