This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: strip & nop relocs
On Fri, Nov 14, 2008 at 12:50:01PM +0000, Nathan Sidwell wrote:
> Alan Modra wrote:
>> On Fri, Nov 14, 2008 at 10:59:24AM +0000, Nathan Sidwell wrote:
>>> /* This case can occur when using --strip-symbol on a symbol
>>> ! which is used in a relocation entry. Some compilers use
>>> ! this to link code to debug sections. It's only a problem if
>>> ! the symbol is in an allocatable section, so complain then. */
>>
>> Haven't you just broken the link you are talking about? Why is that
>> not a problem?
>
> You're stripping the debug sections out of the object. Currently that
> fails because of this dangling link. the user wants that link broken,
> because they're explicitly removing the debug sections. The patch makes
> it not an error.
>
> Is there some other case you're concerned about?
No, I just wanted to understand how this situation came about. I
think the real bug is in strip. We have code there to remove relocs,
but only for STRIP_ALL. Wouldn't it be better to remove any reloc
against a symbol in a stripped section?
--
Alan Modra
Australia Development Lab, IBM