This is an archive of the discontinued LLVM Phabricator instance.

[ARM64EC 5/?] Fix names of __chkstk and __security_check_cookie.
ClosedPublic

Authored by efriedma on May 11 2022, 1:47 PM.

Details

Summary

Part of initial Arm64EC patchset.

Arm64EC code needs to use functions with a different name, to avoid using the x64 versions.

Diff Detail

Event Timeline

efriedma created this revision.May 11 2022, 1:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2022, 1:47 PM
efriedma requested review of this revision.May 11 2022, 1:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2022, 1:47 PM
DavidSpickett accepted this revision.May 12 2022, 6:25 AM
DavidSpickett added a reviewer: DavidSpickett.

(subject to discussion on what the final triple is but just a find/replace here)

dpaoliello accepted this revision.May 31 2022, 10:54 AM
This revision is now accepted and ready to land.May 31 2022, 10:54 AM
bcl5980 added inline comments.
llvm/lib/Target/AArch64/AArch64Subtarget.h
359

Do we need to use #__chkstk_arm64ec here?

efriedma added inline comments.Jul 14 2022, 9:41 AM
llvm/lib/Target/AArch64/AArch64Subtarget.h
359

Probably? I'm still not entirely sure how that interacts with the hybmp table.

This revision was landed with ongoing or failed builds.Sep 5 2022, 1:20 PM
This revision was automatically updated to reflect the committed changes.
bcl5980 added inline comments.Sep 26 2022, 2:45 AM
llvm/lib/Target/AArch64/AArch64Subtarget.h
359
main_clang.obj : error LNK2019: unresolved external symbol __chkstk_arm64ec referenced in function $iexit_thunk$cdecl$i8$varargs (EC Symbol)

It looks we do need add # here. This is the link error when I try to link a variadic function. It will disappear after I add #.

efriedma added inline comments.Sep 26 2022, 12:21 PM
llvm/lib/Target/AArch64/AArch64Subtarget.h
359

Hmm, okay... does this specifically apply to __chkstk_arm64ec and __security_check_cookie_arm64ec, or have you noticed link errors for anything else? (Trying to confirm if there's some general mangling rule we're missing, or these functions are just weird.)

bcl5980 added inline comments.Sep 26 2022, 7:34 PM
llvm/lib/Target/AArch64/AArch64Subtarget.h
359

No other link errors for this case.
For now, I haven't found any other case similar to this.
But I haven't tested too many cases because my local code still has many issues.