-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Improperly nested .cfi region check should only fire on MachO targets #72802
Comments
@llvm/issue-subscribers-lld-elf Author: Jon Roelofs (jroelofs)
https://reviews.llvm.org/D155245#4657075
> However, I noticed a different surprising detail here; it looks like this check fails to trigger on Linux (ELF in general I presume?) targets, while it does trigger on MachO and COFF. This can be tested with something like this:
|
Due to Mach-O's Technically a non-local symbol can be defined in the middle of a function for ELF and other non-Mach-O object file formats. This is not commonly used. However, I am also not sure whether we need to impose this restriction. If an assembly file is shared between ELF and Mach-O, I think it is fair to say that the user should be responsible for ensuring that there is no non-local symbol between a pair of |
I have seen nested globals used e.g. in FreeBSD where the I think in most cases the nested global is an accident, so maybe a warning that can be silenced for legitimate use cases is the right thing? |
The actual thing I'm trying to prevent is crashes from broken relocations, which occur when the |
I posted a follow-up on https://reviews.llvm.org/D155245#4657375 but I think maybe Phabricator never sent the email. The situation with this vs. the compiler-rt builtins (which were patched in 7939ce3) seems a bit unfortunate. We hit that in https://crbug.com/1504532 but in general this means that it's no longer possible to build LLVM 17 with LLVM 18. IIUC the builtins problem boils down to:
vs.
To me these look equivalent at the binary level, but maybe with |
This avoids a: `error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs` error. That error was introduced in https://reviews.llvm.org/D155245#4657075 see also llvm/llvm-project#72802
This avoids a: `error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs` error. That error was introduced in https://reviews.llvm.org/D155245#4657075 see also llvm/llvm-project#72802 (cherry picked from commit a4e793e)
This avoids a: `error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs` error. That error was introduced in https://reviews.llvm.org/D155245#4657075 see also llvm/llvm-project#72802 (cherry picked from commit a4e793e)
…Lang#54634) This avoids a: `error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs` error. That error was introduced in https://reviews.llvm.org/D155245#4657075 see also llvm/llvm-project#72802
…Lang#54634) This avoids a: `error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs` error. That error was introduced in https://reviews.llvm.org/D155245#4657075 see also llvm/llvm-project#72802 (cherry picked from commit a4e793e) (cherry picked from commit 3f35094)
…Lang#54634) (#199) This avoids a: `error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs` error. That error was introduced in https://reviews.llvm.org/D155245#4657075 see also llvm/llvm-project#72802 (cherry picked from commit a4e793e) (cherry picked from commit 3f35094) Co-authored-by: Gabriel Baraldi <baraldigabriel@gmail.com>
https://reviews.llvm.org/D155245#4657075
The text was updated successfully, but these errors were encountered: