This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Copy thumb-ness in .symver


On Thu, Mar 15, 2007 at 11:39:26AM +0000, Nick Clifton wrote:
> Hi Daniel,

> >I suspect this affects .set also.  When I asked Paul about it, he felt
> >that was fine.  The current behavior of .set is a bit illogical in
> >that regard.

> How exactly ?

% cat set.s
        .thumb_func
        .code 16
foo:    bx pc

        .set bar, foo

% readelf -s set.o

Symbol table '.symtab' contains 8 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
...
     5: 00000001     0 FUNC    LOCAL  DEFAULT    1 foo
     6: 00000000     0 NOTYPE  LOCAL  DEFAULT    1 bar

The Thumb bit's gone.  FUNC's been lost too, not sure why.
I think it's a bug, according to the documentation at least.

7.85 `.set SYMBOL, EXPRESSION'
==============================

Set the value of SYMBOL to EXPRESSION.  This changes SYMBOL's value and
type to conform to EXPRESSION.  If SYMBOL was flagged as external, it
remains flagged (*note Symbol Attributes::).

With the patch:

     5: 00000001     0 FUNC    LOCAL  DEFAULT    1 foo
     6: 00000001     0 FUNC    LOCAL  DEFAULT    1 bar

To be honest I'm not quite sure how my patch fixed preservation of
STT_FUNC - that was a pleasant surprise.

> Assuming that your extra tests do not show any problems then this patch is 
> approved.

Thanks.  They didn't, so I'll commit it.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]