bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/15478] -no-as-needed required to avoid runtime symbol lookup e


From: sparkprime at gmail dot com
Subject: [Bug gold/15478] -no-as-needed required to avoid runtime symbol lookup error
Date: Tue, 21 May 2013 00:27:30 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=15478

--- Comment #12 from Dave Cunningham <sparkprime at gmail dot com> 2013-05-21 
00:27:30 UTC ---
I guess you need to do a full mark/sweep.  It's similar to garbage collection,
except instead of heap objects you have .so files, the .o files are the stack,
and the symbols are the fields of objects (or variables on the stack).

So you'd have to start from each .o file, and scan it looking for symbols
satisfied by .so files, then if you touch a .so file that hasn't been marked
yet, you mark it and recursively being again with that .so file as a base.

Anything that ends up not marked is not 'needed'.

The algorithm sounds pretty simple but if you're not recording information
about links between .so files then that would be an issue.

Maybe you can communicate with the gcc people and get them to not use this flag
by default?

The documentation I pasted was from man pages, not sure if those are from
upstream or added by Ubuntu.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]