This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Parse & emit the N_ARM_THUMB_DEF symbol flag
ClosedPublic

Authored by int3 on Apr 29 2021, 11:20 AM.

Details

Reviewers
gkm
Group Reviewers
Restricted Project
Commits
rG05c5363b3998: [lld-macho] Parse & emit the N_ARM_THUMB_DEF symbol flag
Summary

Eventually we'll use this flag to properly handle bl/blx
opcodes.

Diff Detail

Event Timeline

int3 created this revision.Apr 29 2021, 11:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2021, 11:20 AM
int3 requested review of this revision.Apr 29 2021, 11:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2021, 11:20 AM
gkm accepted this revision.Apr 30 2021, 9:11 AM
gkm added a subscriber: gkm.

LGTM ... except for the jarring introduction of an arch-specific bit into arch-independent code. Yet, N_ARM_THUMB_DEF already exists as an arch-dependent bit among the otherwise arch-independent symbol table flags, so I see no way around it.

lld/MachO/Driver.cpp
554–555

Super nit.

This revision is now accepted and ready to land.Apr 30 2021, 9:11 AM
int3 marked an inline comment as done.Apr 30 2021, 9:26 AM

LGTM ... except for the jarring introduction of an arch-specific bit into arch-independent code. Yet, N_ARM_THUMB_DEF already exists as an arch-dependent bit among the otherwise arch-independent symbol table flags, so I see no way around it.

Yup, I feel the same way, but the ABI is what it is.

lld/MachO/Driver.cpp
554–555

this isn't up to me, it's clang-format :p

This revision was automatically updated to reflect the committed changes.
int3 marked an inline comment as done.