+2019-06-06 Sudakshina Das <sudi.das@arm.com>
+
+ * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
+ alignment of the new gnu property section.
+
2019-06-06 Sudakshina Das <sudi.das@arm.com>
* bfd-in.h: Change comment.
bfd *pbfd;
bfd *ebfd = NULL;
elf_property *prop;
+ unsigned align;
uint32_t gnu_prop = *gprop;
info->callbacks->einfo (
_("%F%P: failed to create GNU property section\n"));
+ align = (bfd_get_mach (ebfd) & bfd_mach_aarch64_ilp32) ? 2 : 3;
+ if (!bfd_set_section_alignment (ebfd, sec, align))
+ {
+ info->callbacks->einfo (_("%F%pA: failed to align section\n"),
+ sec);
+ }
+
elf_section_type (sec) = SHT_NOTE;
}
}
+2019-06-06 Sudakshina Das <sudi.das@arm.com>
+
+ * testsuite/ld-aarch64/aarch64-elf.exp: Add new tests.
+ * testsuite/ld-aarch64/property-bti-pac4-a.d: New test.
+ * testsuite/ld-aarch64/property-bti-pac4-b.d: New test.
+ * testsuite/ld-aarch64/property-bti-pac4.s: New test.
+
2019-06-06 Sudakshina Das <sudi.das@arm.com>
* NEWS: Update options names.
run_dump_test "property-bti-pac1"
run_dump_test "property-bti-pac2"
run_dump_test "property-bti-pac3"
+run_dump_test "property-bti-pac4-a"
+run_dump_test "property-bti-pac4-b"
run_dump_test "bti-plt-1"
run_dump_test "bti-plt-2"
--- /dev/null
+#name: PT_GNU_PROPERTY alignment
+#source: property-bti-pac4.s
+#as: -mabi=lp64
+#ld: -z force-bti -e main
+#readelf: -l --wide
+#target: *linux*
+#warning: .*property-bti-pac4.*: warning: BTI turned on by -z force-bti.*
+
+#...
+ GNU_PROPERTY .* +0x8
+#...
--- /dev/null
+#name: PT_GNU_PROPERTY alignment ILP32
+#source: property-bti-pac4.s
+#as: -mabi=ilp32
+#ld: -m [aarch64_choose_ilp32_emul] -z force-bti -e main
+#readelf: -l --wide
+#target: *linux*
+#warning: .*property-bti-pac4.*: warning: BTI turned on by -z force-bti.*
+
+#...
+ GNU_PROPERTY .* +0x4
+#...
--- /dev/null
+ .arch armv8-a
+ .file "t.c"
+ .text
+ .align 2
+ .p2align 3,,7
+ .global f
+ .type f, %function
+f:
+ add w0, w0, 1
+ ret
+ .size f, .-f
+ .section .text.startup,"ax",@progbits
+ .align 2
+ .p2align 3,,7
+ .global main
+ .type main, %function
+main:
+ mov w0, 6
+ ret
+ .size main, .-main
+ .section .note.GNU-stack,"",@progbits