在 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
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature