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

Re: need a little help with this one.



Hello Ben,

Ben Woodard <woodard@redhat.com> a écrit:

> Grab the objects from 20323 and compare gcc and pgi
>
> You’ll get something like:
>   [A] 'function void extent_tree_ad_destroy()'    {extent_tree_ad_destroy}
>   [A] 'function void extent_tree_ad_destroy_recurse()'    {extent_tree_ad_destroy_recurse}
>   [A] 'function void extent_tree_szad_destroy()'    {extent_tree_szad_destroy}
>   [A] 'function void extent_tree_szad_destroy_recurse()'    {extent_tree_szad_destroy_recurse}
>   [A] 'function void je_a0dalloc()'    {je_a0dalloc}
>   [A] 'function void je_a0malloc()'    {je_a0malloc}
>  …
>
> I was looking at the DWARF and I don’t understand why those come up,
> Why it is considered a new function? I can see that pgi has
> practically no useful information but I don’t see why it is considered
> a new function. My guess is that libabigail somehow assumes that
> because the prototype is different it thinks that it is a new function
> or something but that is a low probability guess. 

Ah, sorry I forgot to reply to this here because we did have the
discussion on IRC.

So, just for the record, I am pasting the relevant portion of our IRC
discussion over here so that it gets archived :-)

    <neb> Dodji: as I said in my email, I may need some help understanding why libabigail considers all those functions as added
          in pgi's shit DWARF  [11:03]
    [...]

    <Dodji> neb: libabigail doesn't look at just dwarf for added/removed functions
    <Dodji> neb: it also looks at the elf symbol table.
    [...]
    <Dodji> neb: maybe those functions where not *public* when they were generated by GCC?
    <neb> do you have any tricks for printing that out using eu-readelf?
    <Dodji> neb: readelf -s I'd say
    <Dodji> neb: and look to see if the functions are marked GLOBAL
    <Dodji> dodji@adjoa:fixes$ eu-readelf -s tests/data/test-diff-filter/test34-libjemalloc.so.2-gcc-6.1.0 | grep
            extent_tree_ad_destroy  [11:09]
    <Dodji>   577: 000000000003a390   3268 FUNC    LOCAL  DEFAULT       10 extent_tree_ad_destroy_recurse
    <Dodji>   642: 000000000003b060   2157 FUNC    LOCAL  DEFAULT       10 extent_tree_ad_destroy
    <Dodji> dodji@adjoa:fixes$ 
    <Dodji> neb: see, those function *symbols* are marked as 'LOCAL' in the gcc binary
    <Dodji> so not exported
    <Dodji> It's only when the function is exported that libabigail looks at its DWARF for its signature and whatnot
    <Dodji> by exported, I mean the function should be marked as "GLOBAL", when you look at it with eu-readelf -s
    <neb> ah and so pgi is marking them global

Cheers,

-- 
		Dodji