This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

question of ld


        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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]