[PATCH] D85415: [Sparc] Don't use SunStyleELFSectionSwitchSyntax
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 2 04:00:37 PDT 2020
ro added a comment.
I've now discovered that not only the sparc assembler output requires GNU `as`, but the same is true for x86:
- `as` is invoked without `-m64`/`-m32`, thus chokes on amd64 insns since it default to 32-bit mode
- Even if adding `-Wa,-m64`, assembly fails:
Assembler: main.c
"/var/tmp/main-faae1e.s", line 24 : Syntax error
Near line: " .section ".note.GNU-stack","", at progbits"
- There must be no double quotes around the section name.
- Without the quotes, the section name is no valid identifier: `-` isn't allowed.
- On top of that, Solaris doesn't care about those `.note` sections: to achieve non-executable stacks, you need e.g. `ld -z sx=nxstack` (Solaris 11.4) or `ld -z nxstack` (Solaris 11.3).
However, to make `-fno-integrated-as` work on Solaris is more work than just enforcing use of `/usr/gnu/bin/as`. I guess I'll split that off into a separate patch: the Sun style section syntax change makes the situation here neither worse nor better.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85415/new/
https://reviews.llvm.org/D85415
More information about the llvm-commits
mailing list