bug-binutils
[Top][All Lists]
Advanced

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

Re: [Bug binutils/19104] [PATCH] 'add symbol' feature in objcopy


From: Nick Clifton
Subject: Re: [Bug binutils/19104] [PATCH] 'add symbol' feature in objcopy
Date: Mon, 19 Oct 2015 12:56:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Hi Ronald,

How about this:

   If the symbol already exists and the symbol that is being added has the
warning flag set, then it is treated as the addition of a warning, and it is
inserted before the real symbol.
   Otherwise if the new version of the symbol has the same flags as the
current version then the addition is ignored.
   Otherwise an error message is generated.

I am not really sure what you mean here. As far as I understand, a warning
symbol will print a warning in the linker when the following symbol is used.
The text in the warning is the name of the symbol and the value is irrelevant.

Doh!  Yes, I was getting confused about how warning symbols are used.

I was more
thinking about adding another flag (which is not a real symbol flag), like
'before=<symbol>'. This will surely complicate the 'parse_symflags' function,
but at least not trigger symbol lookup for all --add-symbol, only when this
flag is given. Or maybe another suffix like '@<symbol>' to specify before which
other symbol the symbol (whether warning or not) needs to be inserted.

Mmmm, OK - that makes sense.

AH, and maybe there needs to be 'escapes' in case the user wants to specify
symbols containing ':' or ',' or '@'...

True.

Would you care to submit a revised patch then ?

Cheers
  Nick





reply via email to

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