473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

after stripping all debugging symbols in static lib, final link fails

365 100+
creating execuable file in Linux by linking some static libraries (to link ibxyz.a, using -lxyz option). if I strip all symbols in static library (strip -s libxyz.a), then if try to link again, then I gets lot of "undefined reference", can't I do strip on static library using below command?

strip -s xyz.a
Dec 3 '09 #1
6 9821
Banfa
9,065 Expert Mod 8TB
Erm if you strip all symbols using -s then there will be no symbols left in the library including all the functions you are expecting the linker to find.
Dec 3 '09 #2
tvnaidu
365 100+
Looklike I ma using wrong one, I have to use -g option to remove debugging symbols.

why -S option available, it is not useful at all?
Dec 3 '09 #3
Banfa
9,065 Expert Mod 8TB
It is eminently useful if you want to force a rebuild of your library from scratch.
Dec 3 '09 #4
RRick
463 Expert 256MB
Typically, strip is used on a final product like an executable or program. This removes all symbolic information from prying eyes. It makes no sense to do this to a library (unless you really want to rebuild it, like Banfa suggested).

-S might be the option you might want to use. It only removes debugging info.
Dec 3 '09 #5
tvnaidu
365 100+
Thanks. Let me commant that "strip" command right now, let me enable only for final release, right now I just tried whether it is working or not, since my exeuatble file is almost 1.8 meg size, when I do strip on all static libraries, I got down file size to 800K, but currently let me disable strip command.
Dec 3 '09 #6
tvnaidu
365 100+
but I have other thread, I have some issue with shared libs, I changed all to static libs, I created linux execuatble using -static option, somebody suggested not to use -static option at all, if I takeout that -static option, I can see segmentation fault.
Dec 3 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Torbak | last post by:
I got some question about symbols in libraries ... In libraries, there is public symbols and "not public" symbols (private, static)... In C when we use the "static" keyword on the declaration of...
2
by: Shea Martin | last post by:
Solaris 9, Sun Workshop 5.0 I have ObjectA.o, ObjectB.o. ObjectA.o uses std::list. I created a archive of the objects: ar cvr libAB.a *.o. I have example.cc which I am trying to compile...
7
by: Mikael Östberg | last post by:
Hello all! I have been working on a project for some time now and yesterday, my debugger stopped working. It is a class library which I run from a Win32 test app, so no IIS involved at this...
2
by: mark | last post by:
Can't figure this one out. I appears to not be code related. After surfing my asp.net web app for a while 5 - 10 min. it fails to open any further connections to my access 2000 database. There...
2
by: chandu | last post by:
Hello, if create a new project is visual studio 2005 C# windows application. If i run the application First time VS allows me to debug the code. if i made any changes to code and debug again it...
2
by: Zach | last post by:
I compiled a game client and it crashed (segmentation fault) resulting in a core file being generated. I'm trying to find out exactly what caused it to crash. Any ideas how I can do this with gdb?...
3
by: Chris Mullins [MVP - C#] | last post by:
Anyone gotten this working yet? I'm really looking forward to stepping right into the Framework code.... I have it set to download symbols from: http://source.msdn.microsoft.com/symbols I got...
0
by: John [H2O] | last post by:
There's a lot of greek for me here ... should I post to numpy-discussions as well??? The backtrace is at the bottom.... Thanks! GNU gdb Fedora (6.8-21.fc9) Copyright (C) 2008 Free...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi misters, i have application winforms in VB.NET When I press F5, for executing Debug....it's slows... I see,
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.