Mark SFrame sections with SEC_EXCLUDE if --no-sframe-info is in effect.
TBD:
- This does generate an empty .sframe section though! A problem ? No
segment marker PT_GNU_SFRAME is created, which is good
bfd/
* elf-sframe.c (_bfd_elf_parse_sframe): Mark with SEC_EXCLUDE if
--no-sframe-info is in effect.
ld/testsuite/
* ld-x86-64/x86-64.exp: New test.
* ld-x86-64/sframe-command-line-1.d: New test.
bfd_size_type sf_size;
int decerr = 0;
+ if (info->no_ld_sframe_info)
+ sec->flags |= SEC_EXCLUDE;
+
/* Prior versions of assembler and ld were generating SFrame sections with
section type SHT_PROGBITS. Issue an error for lack of support for such
objects now. Even if section size is zero, a valid section type is
--- /dev/null
+#as: --gsframe
+#source: sframe-foo.s
+#source: sframe-bar.s
+#readelf: --sframe
+#ld: -shared --no-rosegment -z separate-code --no-sframe-info
+#name: Command line option --no-sframe-info
+
+Section '.sframe' has no debugging data.
if { ![skip_sframe_tests] } {
run_dump_test "sframe-simple-1"
+ run_dump_test "sframe-command-line-1"
run_dump_test "sframe-reloc-1"
run_dump_test "sframe-plt-1"
run_dump_test "sframe-ibt-plt-1"