Skip to content

[llvm-gcc] Using __asm__ to rename symbols is broken on OS/X #1002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lattner opened this issue Sep 24, 2005 · 2 comments
Closed

[llvm-gcc] Using __asm__ to rename symbols is broken on OS/X #1002

lattner opened this issue Sep 24, 2005 · 2 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead llvm-tools All llvm tools that do not have corresponding tag

Comments

@lattner
Copy link
Collaborator

lattner commented Sep 24, 2005

Bugzilla Link 630
Resolution FIXED
Resolved on Feb 22, 2010 12:50
Version 1.3
OS MacOS X

Extended Description

LLVM miscompiles this:

void foo() asm("_foo2");
void bar() {
foo();
}

"_" (aka USER_LABEL_PREFIX in GCC target header files) should only be added to user symbols, not to
asm's. Because of this, the "foo" function should really reference "_foo2", not "__foo2".

The right way to do this is to remove the "_" prefixification from the darwin asm printer, and make the
CFE add USER_LABEL_PREFIX to user labels (duh), but not asm labels.

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Sep 24, 2005

assigned to @lattner

@lattner
Copy link
Collaborator Author

lattner commented Sep 24, 2005

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
searlmc1 pushed a commit to ROCm/llvm-project that referenced this issue Mar 7, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
xlauko pushed a commit to trailofbits/instafix-llvm that referenced this issue Mar 28, 2025
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead llvm-tools All llvm tools that do not have corresponding tag
Projects
None yet
Development

No branches or pull requests

1 participant