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.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to