[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-06-08 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added a comment. Doing this on 32-bit Arm would make me nervous as STT_FUNC symbols encode the state of Arm/Thumb in the bottom bit, but STT_NOTYPE symbols do not. In principle it could be done but extra care would have to be taken to make sure no state changes were required. For

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-06-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D101873#2804669 , @lanza wrote: > Hey Fangrui, is there any reason this couldn't extend to armv7? @lanza Always happy when more folks are interested in such kind of stuff:) This needs backend work. See D101872

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-06-08 Thread Nathan Lanza via Phabricator via cfe-commits
lanza added a comment. Hey Fangrui, is there any reason this couldn't extend to armv7? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101873/new/ https://reviews.llvm.org/D101873 ___ cfe-commits mailing

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-05-10 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG68a20c7f36d1: [clang] Support -fpic -fno-semantic-interposition for AArch64 (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101873/new/

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-05-10 Thread Peter Smith via Phabricator via cfe-commits
peter.smith accepted this revision. peter.smith added a comment. This revision is now accepted and ready to land. LGTM as this is opt in with a command line option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101873/new/

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-05-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D101873#2743987 , @peter.smith wrote: > Thanks for the update. > > With the clarification that this isn't breaking aarch64 long range thunks > now, and we are not considering Arm then I'm happy for this to happen if the >

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-05-07 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added a comment. Thanks for the update. With the clarification that this isn't breaking aarch64 long range thunks now, and we are not considering Arm then I'm happy for this to happen if the user opts in with -fno-semantic-interposition. I think the longer term question, outside

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-05-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D101873#2741903 , @peter.smith wrote: > In D101873#2741299 , @MaskRay wrote: > >> https://gist.github.com/MaskRay/2d4dfcfc897341163f734afb59f689c6 has more >> information about

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-05-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. In D101873#2741903 , @peter.smith wrote: > Looking at the gist I've got one concern for AArch64 and Arm. The ABI relies > on thunks which are only defined for symbols of type STT_FUNC. Changing > branches to STT_FUNC to

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-05-06 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added a comment. In D101873#2741299 , @MaskRay wrote: > https://gist.github.com/MaskRay/2d4dfcfc897341163f734afb59f689c6 has more > information about -fno-semantic-interposition. > >> Can Clang default to -fno-semantic-interposition? > > I

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-05-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. https://gist.github.com/MaskRay/2d4dfcfc897341163f734afb59f689c6 has more information about -fno-semantic-interposition. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101873/new/ https://reviews.llvm.org/D101873

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-05-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D101873#2738643 , @peter.smith wrote: > I've no comments on the code in D101872 , > and D10873 they look reasonable to me. I > guess it is down to whether

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64

2021-05-05 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added a comment. I've no comments on the code in D101872 , and D10873 they look reasonable to me. I guess it is down to whether this is the right thing to do or not. Just to check my understanding: - Clang

[PATCH] D101873: [clang] Support clang -fpic -fno-semantic-interposition for AArch64 Depends on D101872

2021-05-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: dmgreen, efriedma, peter.smith. Herald added subscribers: danielkiss, s.egerton, simoncook, kristof.beyls. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG