Re: GCC Output Symbol not Relocatable with -fPIC

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

 



Many thanks! It worked.

On Wed, 13 Nov 2024 at 16:33, LIU Hao via Gcc-help <gcc-help@xxxxxxxxxxx> wrote:
>
> 在 2024-11-13 20:46, Ahmad Nouralizadeh via Gcc-help 写道:
> > I generated the assembly files. The relevant portion of the code
> > (`text_segment_transformer.cpp:83`) is as follows:
> >
> > call syscall_hooker_cxx\n\t
> > (Link: https://github.com/eunomia-bpf/bpftime/blob/808ce5990751af89f5af094c0e8a432b5f5aa35b/attach/text_segment_transformer/text_segment_transformer.cpp#L83)
> >
> > It has the same disassembly in both scenarios (`Ubuntu-18.04` and
> > `Ubuntu-24.04`):
> >
> > call syscall_hooker_cxx
> >
> > But as mentioned in the previous threads, the final relocations have
> > different types. Therefore, the assemblers seem to operate
> > differently. Why does this happen?
> >
> > NOTE THAT, clang uses `callq` which results in relocatable symbols in
> > both scenarios (although it seems to be call internally if I use
> > `-masm=intel` option, link:
>
> I think this should be `call syscall_hooker_cxx@PLT`.
>
> It doesn't matter whether it's intel syntax or at&t; there's only ever one type of direct `call`.
>
>
> --
> Best regards,
> LIU Hao




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux