From: Matthieu Longo Date: Thu, 7 Nov 2024 14:33:09 +0000 (+0000) Subject: aarch64: rename BTI error/warning message X-Git-Tag: gdb-16-branchpoint~225 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1cd84f4c55f3b361cb219f625a397ee039ad0d2;p=thirdparty%2Fbinutils-gdb.git aarch64: rename BTI error/warning message The previous message for missing BTI feature in GNU properties was not very clear. The new message explains that a missing GNU property marking is lacking on this specific input. --- diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index 67824805fe7..41ff2cae940 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -999,10 +999,10 @@ _bfd_aarch64_elf_check_bti_report (struct bfd_link_info *info, bfd *ebfd) const char *msg = (tdata->sw_protections.bti_report == MARKING_WARN) - ? _("%pB: warning: BTI turned on by -z force-bti on the output when all " - "inputs do not have BTI in NOTE section.\n") - : _("%X%pB: error: BTI turned on by -z force-bti on the output when all " - "inputs do not have BTI in NOTE section.\n"); + ? _("%pB: warning: BTI is required by -z force-bti, but this input object " + "file lacks the necessary property note.\n") + : _("%X%pB: error: BTI is required by -z force-bti, but this input object " + "file lacks the necessary property note.\n"); info->callbacks->einfo (msg, ebfd); } \ No newline at end of file diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-1-c.d b/ld/testsuite/ld-aarch64/protections/bti-plt-1-c.d index 2eba9944f40..2fd0dea08cd 100644 --- a/ld/testsuite/ld-aarch64/protections/bti-plt-1-c.d +++ b/ld/testsuite/ld-aarch64/protections/bti-plt-1-c.d @@ -3,7 +3,7 @@ #target: [check_shared_lib_support] #as: -mabi=lp64 #ld: -shared -z force-bti -T bti-plt.ld -L./tmpdir -lbti-plt-so -#warning: .*bti-plt-1\.o: warning: BTI turned on by -z force-bti.* +#warning: .*bti-plt-1\.o: warning: BTI is required by -z force-bti.* #objdump: -dr -j .plt [^:]*: *file format elf64-.*aarch64 diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-i.d b/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-i.d index 52fa96c221b..26121691050 100644 --- a/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-i.d +++ b/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-i.d @@ -4,8 +4,8 @@ #target: [check_shared_lib_support] #as: -mabi=lp64 #ld: -shared -z force-bti -T bti-plt.ld -#warning: .*bti-plt-2\.o: warning: BTI turned on by -z force-bti.* -#warning: .*bti-plt-1\.o: warning: BTI turned on by -z force-bti.* +#warning: .*bti-plt-2\.o: warning: BTI is required by -z force-bti.* +#warning: .*bti-plt-1\.o: warning: BTI is required by -z force-bti.* #readelf: -n # Should warn about the missing input BTI NOTE but should still mark diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-ii.d b/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-ii.d index c1c6db6a5ca..b3d69b8a91e 100644 --- a/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-ii.d +++ b/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-ii.d @@ -4,5 +4,5 @@ #target: [check_shared_lib_support] #as: -mabi=lp64 #ld: -shared -z force-bti -z bti-report=error -T bti-plt.ld -#error: .*bti-plt-2\.o: error: BTI turned on by -z force-bti.* -#error: .*bti-plt-1\.o: error: BTI turned on by -z force-bti.* +#error: .*bti-plt-2\.o: error: BTI is required by -z force-bti.* +#error: .*bti-plt-1\.o: error: BTI is required by -z force-bti.* diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-iii.d b/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-iii.d index 1bf038d28fd..b7db3505500 100644 --- a/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-iii.d +++ b/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-iii.d @@ -4,8 +4,8 @@ #target: [check_shared_lib_support] #as: -mabi=lp64 #ld: -shared -z force-bti -z bti-report=warning -T bti-plt.ld -#warning: .*bti-plt-2\.o: warning: BTI turned on by -z force-bti.* -#warning: .*bti-plt-1\.o: warning: BTI turned on by -z force-bti.* +#warning: .*bti-plt-2\.o: warning: BTI is required by -z force-bti.* +#warning: .*bti-plt-1\.o: warning: BTI is required by -z force-bti.* #readelf: -n # Should warn about the missing input BTI NOTE but should still mark diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-v.d b/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-v.d index 895d64e3499..dddc1835d6e 100644 --- a/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-v.d +++ b/ld/testsuite/ld-aarch64/protections/bti-plt-2-a-v.d @@ -4,8 +4,8 @@ #target: [check_shared_lib_support] #as: -mabi=lp64 #ld: -shared -z force-bti -z bti-report -T bti-plt.ld -#warning: .*bti-plt-2\.o: warning: BTI turned on by -z force-bti.* -#warning: .*bti-plt-1\.o: warning: BTI turned on by -z force-bti.* +#warning: .*bti-plt-2\.o: warning: BTI is required by -z force-bti.* +#warning: .*bti-plt-1\.o: warning: BTI is required by -z force-bti.* #readelf: -n # Should warn about the missing input BTI NOTE but should still mark diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-i.d b/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-i.d index ed85f967df0..99fcd3ccffd 100644 --- a/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-i.d +++ b/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-i.d @@ -3,7 +3,7 @@ #target: [check_shared_lib_support] #as: -mabi=lp64 #ld: -z force-bti -e _start -T bti-plt.ld -L./tmpdir -lbti-plt-so -#warning: .*bti-plt-1\.o: warning: BTI turned on by -z force-bti.* +#warning: .*bti-plt-1\.o: warning: BTI is required by -z force-bti.* #readelf: -n # Should warn about the missing input BTI NOTE but should still mark diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-ii.d b/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-ii.d index 2d8b9b5fefd..91c13817705 100644 --- a/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-ii.d +++ b/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-ii.d @@ -3,4 +3,4 @@ #target: [check_shared_lib_support] #as: -mabi=lp64 #ld: -z force-bti -z bti-report=error -e _start -T bti-plt.ld -L./tmpdir -lbti-plt-so -#error: .*bti-plt-1\.o: error: BTI turned on by -z force-bti.* +#error: .*bti-plt-1\.o: error: BTI is required by -z force-bti.* diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-iii.d b/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-iii.d index 1abd61b7620..8227dd0700b 100644 --- a/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-iii.d +++ b/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-iii.d @@ -3,7 +3,7 @@ #target: [check_shared_lib_support] #as: -mabi=lp64 #ld: -z force-bti -z bti-report=warning -e _start -T bti-plt.ld -L./tmpdir -lbti-plt-so -#warning: .*bti-plt-1\.o: warning: BTI turned on by -z force-bti.* +#warning: .*bti-plt-1\.o: warning: BTI is required by -z force-bti.* #readelf: -n # Should warn about the missing input BTI NOTE but should still mark diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-v.d b/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-v.d index 44b3276b53f..99a49cd567c 100644 --- a/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-v.d +++ b/ld/testsuite/ld-aarch64/protections/bti-plt-4-a-v.d @@ -3,7 +3,7 @@ #target: [check_shared_lib_support] #as: -mabi=lp64 #ld: -z force-bti -z bti-report -e _start -T bti-plt.ld -L./tmpdir -lbti-plt-so -#warning: .*bti-plt-1\.o: warning: BTI turned on by -z force-bti.* +#warning: .*bti-plt-1\.o: warning: BTI is required by -z force-bti.* #readelf: -n # Should warn about the missing input BTI NOTE but should still mark diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-6.d b/ld/testsuite/ld-aarch64/protections/bti-plt-6.d index 6bbba57ff03..a28f84f7ec1 100644 --- a/ld/testsuite/ld-aarch64/protections/bti-plt-6.d +++ b/ld/testsuite/ld-aarch64/protections/bti-plt-6.d @@ -4,7 +4,7 @@ #target: [check_shared_lib_support] #as: -mabi=lp64 -defsym __property_pac__=1 #ld: -shared -z force-bti -#warning: .*property-bti-pac2.*: warning: BTI turned on by -z force-bti.*$ +#warning: .*property-bti-pac2.*: warning: BTI is required by -z force-bti.*$ #readelf: -n # Should warn about the missing input BTI NOTE but should still mark diff --git a/ld/testsuite/ld-aarch64/protections/property-bti-pac4-a.d b/ld/testsuite/ld-aarch64/protections/property-bti-pac4-a.d index d9aa5cfa44b..bd36d8f09b2 100644 --- a/ld/testsuite/ld-aarch64/protections/property-bti-pac4-a.d +++ b/ld/testsuite/ld-aarch64/protections/property-bti-pac4-a.d @@ -4,7 +4,7 @@ #ld: -z force-bti -e main #readelf: -l --wide #target: *linux* -#warning: .*property-bti-pac4.*: warning: BTI turned on by -z force-bti.* +#warning: .*property-bti-pac4.*: warning: BTI is required by -z force-bti.* #... GNU_PROPERTY .* +0x8 diff --git a/ld/testsuite/ld-aarch64/protections/property-bti-pac4-b.d b/ld/testsuite/ld-aarch64/protections/property-bti-pac4-b.d index 02f9fc5acaf..0fbf414ebe6 100644 --- a/ld/testsuite/ld-aarch64/protections/property-bti-pac4-b.d +++ b/ld/testsuite/ld-aarch64/protections/property-bti-pac4-b.d @@ -4,7 +4,7 @@ #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.* +#warning: .*property-bti-pac4.*: warning: BTI is required by -z force-bti.* #... GNU_PROPERTY .* +0x4