Skip to content

PLT functions not renamed when using mold linker #7249

@SlidyBat

Description

@SlidyBat

Version and Platform (required):

  • Binary Ninja Version: 5.2.8101-dev
  • Edition: Non-Commercial
  • OS: Windows
  • OS Version: 10
  • CPU Architecture: x64

Bug Description:
When a binary is compiled using the mold linker, the functions in the .plt section are not renamed to match the function they are calling within the .got.plt section:

Image

For comparison, a binary compiled using default ld will have the function renamed as expected:

Image

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

  1. Compile a hello world program using mold (install mold and use -fuse-ld=mold option in gcc). Alternatively, download attached binary from below.
  2. Open in binja and go to main function
  3. Observe that call to puts in PLT is named sub_4015f0 and not puts

Expected Behavior:
PLT function should be renamed.

Screenshots/Video Recording:
See screenshots above.

Binary:

test_mold.zip

Additional Information:
Please add any other context about the problem here.

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