Skip to content
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

SiFive: Add -z force-zicfilp option #10

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
SiFive: Refine GNU property tests
Add .ifdef in assembly code to control whether we want to add landing
pad or shadow stack GNU properties.
hau-hsu committed Oct 25, 2023
commit 29bdb85af6e752a53583b6d352af010744cf7b5a
2 changes: 1 addition & 1 deletion ld/testsuite/ld-riscv-elf/property-combine-and-1.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#name: GNU Property (multiple inputs, combine section)
#source: property1.s
#source: property2.s
#as: -march=rv64g -defsym __property_filp__=1
#as: -march=rv64g -defsym __property_zicfilp__=1 -defsym __property_zicfiss__=1
#ld: -shared
#readelf: -n

2 changes: 1 addition & 1 deletion ld/testsuite/ld-riscv-elf/property-zicfilp.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#name: GNU Property (single input)
#source: property-zicfilp.s
#as: -march=rv64g
#as: -march=rv64g -defsym __property_zicfilp__=1
#ld: -shared
#readelf: -n

5 changes: 5 additions & 0 deletions ld/testsuite/ld-riscv-elf/property1.s
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
_start:
ret

.ifdef __property_zicfilp__
.section ".note.gnu.property", "a"
.p2align 3
.long 1f - 0f /* name length */
@@ -19,6 +20,9 @@ _start:
4:
.p2align 3
5:
.endif

.ifdef __property_zicfiss__
.p2align 3
.long 1f - 0f /* name length */
.long 5f - 2f /* data length */
@@ -33,3 +37,4 @@ _start:
4:
.p2align 3
5:
.endif