Skip to content

[LLD][AArch64] Occasionally LLD drops data marker for long abs thunks #142326

Open
@maksfb

Description

@maksfb

In some cases, LLD may drop $d (data in code marker) symbol in the middle of created absolute long thunk. E.g.:

$ llvm-objdump -d <binary>
...
0000000013cef07c <__AArch64AbsLongThunk__foo>:
    13cef07c:   58000050        ldr     x16, 13cef084 <__AArch64AbsLongThunk__foo+0x8>
    13cef080:   d61f0200        br      x16
    13cef084:   0bce33d0        .inst   0x0bce33d0 ; undefined
    13cef088:   00000000        udf     #0 
...
$ llvm-nm --special-syms -nS <binary>
...
0000000013cef07c 0000000000000010 t __AArch64AbsLongThunk_<foo>
0000000013cef08c t $x
0000000013cef08c 0000000000000010 t __AArch64AbsLongThunk_<bar>
...

The expected output for llvm-nm should include:

0000000013cef084 t $d

The bug manifests on large binaries and less than one in a thousand thunks will have a symbol missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions