aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-12-03[gdb/python] Handle empty PYTHONDONTWRITEBYTECODETom de Vries2-6/+24
When using PYTHONDONTWRITEBYTECODE with an empty string we get: ... $ PYTHONDONTWRITEBYTECODE= gdb -q -batch -ex "show python dont-write-bytecode" Python's dont-write-bytecode setting is auto (currently on). ... This is incorrect, it should be off. The actual setting is correct, that was already fixed in commit 24d2cbc42cc ("set/show python dont-write-bytecode fixes"), in function python_write_bytecode. Fix this by: - factoring out new function env_python_dont_write_bytecode out of python_write_bytecode, and - using it in show_python_dont_write_bytecode. Tested on x86_64-linux, using test-case gdb.python/py-startup-opt.exp and: - PYTHONDONTWRITEBYTECODE= - PYTHONDONTWRITEBYTECODE=1 - unset PYTHONDONTWRITEBYTECODE Approved-By: Tom Tromey <tom@tromey.com> PR python/32389 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32389
2024-12-03[gdb/testsuite] Fix gdb.python/py-startup-opt.exp with empty ↵Tom de Vries1-2/+3
PYTHONDONTWRITEBYTECODE When running test-case gdb.python/py-startup-opt.exp with empty PYTHONDONTWRITEBYTECODE: ... $ cd build/gdb/testsuite $ PYTHONDONTWRITEBYTECODE= make check \ RUNTESTFLAGS=gdb.python/py-startup-opt.exp ... I get: ... end^M dont_write_bytecode is off^M (gdb) FAIL: $exp: attr=dont_write_bytecode: testname: input 6: end ... The problem is that the test-case expects dont_write_bytecode to be on, which is incorrect because PYTHONDONTWRITEBYTECODE only has effect if set to a non-empty string [1]. Fix this by correctly setting expectations in the test-case. Tested on x86_64-linux, with: - PYTHONDONTWRITEBYTECODE= - PYTHONDONTWRITEBYTECODE=1 - unset PYTHONDONTWRITEBYTECODE Approved-By: Tom Tromey <tom@tromey.com> [1] https://docs.python.org/3/using/cmdline.html#envvar-PYTHONDONTWRITEBYTECODE
2024-12-03[gdb/python] Warn and ignore ineffective python settingsTom de Vries1-25/+51
Configuration flags "python dont-write-bytecode" and "python ignore-environment" have effect only at Python initialization. For instance, setting "python dont-write-bytecode" here has no effect: ... $ gdb -q (gdb) show python dont-write-bytecode Python's dont-write-bytecode setting is auto (currently off). (gdb) python import sys (gdb) python print (sys.dont_write_bytecode) False (gdb) set python dont-write-bytecode on (gdb) python print (sys.dont_write_bytecode) False ... This is not clear in the code: we set Py_DontWriteBytecodeFlag and Py_IgnoreEnvironmentFlag in set_python_ignore_environment and set_python_dont_write_bytecode. Fix this by moving the setting of those variables to py_initialization. Furthermore, this is not clear to the user: after Python initialization, the user can still modify the configuration flags, and observe the changed setting: ... $ gdb -q (gdb) show python ignore-environment Python's ignore-environment setting is off. (gdb) set python ignore-environment on (gdb) show python ignore-environment Python's ignore-environment setting is on. (gdb) ... Fix this by emitting a warning when trying to set these configuration flags after Python initialization: ... $ gdb -q (gdb) set python ignore-environment on warning: Setting python ignore-environment after Python initialization has \ no effect, try setting this during early initialization (gdb) set python dont-write-bytecode on warning: Setting python dont-write-bytecode after Python initialization has \ no effect, try setting this during early initialization, or try setting \ sys.dont_write_bytecode ... and by keeping the values constant after Python initialization. Since the auto setting for python dont-write-bytecode depends on the current value of environment variable PYTHONDONTWRITEBYTECODE, we simply avoid it after Python initialization: ... $ gdb -q -batch \ -eiex "show python dont-write-bytecode" \ -iex "show python dont-write-bytecode" Python's dont-write-bytecode setting is auto (currently off). Python's dont-write-bytecode setting is off. ... Tested on aarch64-linux. Approved-By: Tom Tromey <tom@tromey.com> PR python/32388 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32388
2024-12-03[gdb/python] Drop ATTRIBUTE_UNUSED on py_initialize_catch_abortTom de Vries1-6/+8
I added ATTRIBUTE_UNUSED to py_initialize_catch_abort as a quick fix to deal with it being unused for PY_VERSION_HEX >= 0x030a0000, but forgot to fix this before committing. Fix this now, by removing the attribute and using '#if PY_VERSION_HEX < 0x030a0000' instead. Tested on aarch64-linux. Approved-By: Tom Tromey <tom@tromey.com>
2024-12-03[gdb/python] Factor out and refactor py_initializeTom de Vries1-30/+49
Function do_start_initialization has a large part dedicated to initializing the python interpreter, as opposed to the rest of the function where gdb-specific python support is initialized. Factor out this part, as new function py_initialize, and rename the existing py_initialize to py_initialize_catch_abort. Refactor the new function py_initialize by getting rid of the nested: ... #ifdef WITH_PYTHON_PATH #if PY_VERSION_HEX < 0x030a0000 #else #endif #else #endif ... In particular, this changes behaviour for the "!defined (WITH_PYTHON_PATH)" case. For the "defined (WITH_PYTHON_PATH)" case, we've started using Py_InitializeFromConfig () for PY_VERSION_HEX >= 0x030a0000 to deal with the deprecation of Py_SetProgramName in 3.11. For the "!defined (WITH_PYTHON_PATH)" case, we don't use Py_SetProgramName so we stuck with Py_Initialize (). However, in 3.12 Py_DontWriteBytecodeFlag and Py_IgnoreEnvironmentFlag got deprecated and also here we need Py_InitializeFromConfig () to deal with this, but the "!defined (WITH_PYTHON_PATH)" case didn't get updated. This should be taken care of, now that we have this behavior: - for PY_VERSION_HEX < 0x030a0000 we use Py_Initialize - for PY_VERSION_HEX >= 0x030a0000 we use Py_InitializeFromConfig I'm not sure how to test the "!defined (WITH_PYTHON_PATH)" though. Tested on aarch64-linux. Approved-By: Tom Tromey <tom@tromey.com>
2024-12-03gdb: restore nullptr check in compunit_symtab::find_call_siteSimon Marchi1-0/+3
Commit de2b4ab50de ("Convert dwarf2_cu::call_site_htab to new hash table") removed this nullptr check for no good reason. This causes a crash if `m_call_site_htab` is not set, as shown in PR 32410. My guess is that when doing this change, I tried to make `m_call_site_htab` not a pointer, removed this check, then realized it wasn't so obvious, and forgot to re-add the check. Change-Id: I455e00cdc0519dfb412dc7826d17a839b77aae69 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32410 Approved-By: Tom Tromey <tom@tromey.com> Approved-By: Tom de Vries <tdevries@suse.de>
2024-12-03gdb/testsuite: make gdb.reverse/i386-avx-reverse.exp require avxGuinevere Larsen1-6/+3
The test gdb.reverse/i386-avx-reverse.exp was assuming that if the CPU was like x86, it would have AVX instructions because I didn't know how to check for AVX instruction support explicitly. This commit updates that to use the pre-existing TCL proc have_avx. Also update the comment at the top of the test, since it was a copy of a different test. Approved-By: Andrew Burgess <aburgess@redhat.com>
2024-12-03gdb/dbx: Remove stabsect_build_psymtab as it was unusedGuinevere Larsen2-87/+0
The function stabsect_build_psymtabs, defined in the dbxread file, is no longer used in any parts of GDB, so this commit just removes it. Tested by rebuilding. Approved-By: Andrew Burgess <aburgess@redhat.com>
2024-12-03[gdb/testsuite] Fix gdb.base/reset-catchpoint-cond.exp with --with-expat=noTom de Vries1-0/+3
When building gdb with --with-expat=no and running test-case gdb.base/reset-catchpoint-cond.exp we get: ... (gdb) catch syscall write^M warning: Can not parse XML syscalls information; \ XML support was disabled at compile time.^M Unknown syscall name 'write'.^M (gdb) FAIL: $exp: mode=syscall: catch syscall write ... Fix this by skipping the test for --with-expat=no. Tested on x86_64-linux.
2024-12-03[gdb/testsuite] Fix gdb.python/python.exp with --disable-tuiTom de Vries1-0/+4
When building gdb with --disable-tui, we run into: ... (gdb) python print(type(gdb.TuiWindow))^M Python Exception <class 'AttributeError'>: \ module 'gdb' has no attribute 'TuiWindow'^M Error occurred in Python: module 'gdb' has no attribute 'TuiWindow'^M (gdb) FAIL: gdb.python/python.exp: gdb.TuiWindow is registered ... Fix this by skipping the test for --disable-tui. Tested on x86_64-linux.
2024-12-03gdb: fix crash when GDB can't read an objfileGuinevere Larsen3-8/+17
If a user starts an inferior composed of objfiles that GDB is unable to read, there is an error thrown in find_sym_fns, printing the famous "I'm sorry, Dave, I can't do that" and the objfile stops being read. However, the objfile will already have been linked to the program space, and future interactions with the objfile will assume that it is readable. Relevant to this commit, if GDB tries to find out the section that contains a PC, and this section happens to land in the unreadable objfile, GDB will try to create a section mapping, eventually calling update_section_map. Since that function uses bfd to calculate the sections, it'll think there are sections to be ordered, but when trying to access the objfile::section_offsets, it'll be indexing a size 0 std::vector, which will end up segfaulting. Currently, it isn't easy to trigger this crash, but the upcoming possibility to disable support for some file formats would make the crash very easy to reproduce, by attempting to debug an unsupported inferior and using "break *<instruction>" command, or simply connecting to a gdbserver loaded with an unsupported inferior. The struct objfile_up seems to have been created to catch these kinds of errors and unlink the partially-read objfile from the program space, as the objfile isn't useful to GDB anymore, but it seems to have been added before find_sym_fns would throw errors for unreadable objfiles, as the instance in syms_from_objfile_1 (that could save GDB from this crash) is declared well after find_sym_fns, too late to guard us. This commit moves the declaration up to the top of the function, so it works as intended. Further discussion on the mailing list also agreed that the name "objfile_up" implies some level of ownership of the pointer, which this struct doesn't have. So this commit renames the struct to scoped_objfile_unlinker, which is more descriptive of what the struct is actually meant to do. The final change this commit does is add an assertion to objfile::section_offset and objfile::set_section_offset, which ensures that the section_offsets vector is large enough to return the desired offset. This ensures that we won't misteriously segfault or worse, continue going with garbage data. Reported-By: Andrew Burgess <aburgess@redhat.com> Approved-By: Andrew Burgess <aburgess@redhat.com>
2024-12-03gas: Re-enable .org test 1 on all targets except kvxJens Remus1-1/+1
It got erroneously disabled for all targets including kvx instead of excluding kvx only. gas/testsuite/ * gas/all/org-1.d: Re-enable on all targets except kvx. Fixes: 6e712424f5cb ("kvx: New port.") Signed-off-by: Jens Remus <jremus@linux.ibm.com>
2024-12-03s390: Enable .bss/.struct data allocation directives testsJens Remus2-2/+2
This reduces the number of unsupported tests on s390 by two. gas/testsuite/ * gas/elf/bss.d: Enable for s390*-*-*. * gas/elf/bad-bss.d: Likewise. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
2024-12-03PowerPC: Add support for RFC02680 - PQC Acceleration InstructionsSurya Kumari Jangala3-0/+30
opcodes/ * ppc-opc.c (powerpc_opcodes): Add xvadduwm, xvadduhm, xvsubuwm, xvsubuhm, xvmuluwm, xvmuluhm, xvmulhsw, xvmulhsh, xvmulhuw, xvmulhuh. gas/ * testsuite/gas/ppc/future.s: New test. * testsuite/gas/ppc/future.d: Likewise.
2024-12-03Updated Russian translation and new Malay translation for the BFD sub-directoryNick Clifton1-0/+9711
2024-12-03LoongArch: Fix the infinite loop caused by calling undefweak symbolLulu Cai4-0/+109
The undefweak symbol value of non-default visibility is 0 and does not use plt entry, and will not be relocated in the relocate_secion function. As a result, an infinite loop is generated because bl %plt(sym) => bl 0. Fix this by converting the call into a jump address 0.
2024-12-03gdb: fix comment for gdbarch_stack_grows_downAndrew Burgess1-1/+1
The comment for gdbarch_stack_grows_down was wrong. Fixed in this commit. There should be no user visible changes after this commit.
2024-12-03gas: partly restore how current_location() had workedJan Beulich6-14/+27
Commit 4a826962e760 changed its behavior without saying why, and without putting in place any testcase demonstrating the required behavior. Firmly latch the current position unless deferred-evaluation mode is in effect.
2024-12-03MMIX: use current_location() directlyJan Beulich2-16/+3
It's no longer a static function, so it can be used without involving a wrapper function plus an indirect function call.
2024-12-03gas: streamline expr_build_dot()Jan Beulich1-11/+18
There's no point involving symbol_clone_if_forward_ref(), just for it to replace dot_symbol by one obtained from symbol_temp_new_now(). For the abs-section case also produce a slightly more "complete" (as in: all potentially relevant fields filled) expression by going through expr_build_uconstant(). Move the function next to current_location(), for it to be easier to see the (dis)similarities. Correct the function's comment while there.
2024-12-03Support Intel AVX10.2 BF16 instructionsKong Lingling20-2042/+4965
In this patch, we will support AVX10.2 BF16 instructions. All of them are new instructions forms. In current documentation, it is still VSCALEFPBF16, but it will change to VSCALEFNEPBF16 eventually. In disassembler part, we added %XB to reduce W table pass since all of them get evex.w=0. gas/Changelog: * testsuite/gas/i386/i386.exp: Add AVX10.2 tests. * testsuite/gas/i386/x86-64.exp: Ditto. * testsuite/gas/i386/avx10_2-256-bf16-intel.d: New. * testsuite/gas/i386/avx10_2-256-bf16.d: Ditto. * testsuite/gas/i386/avx10_2-256-bf16.s: Ditto. * testsuite/gas/i386/avx10_2-512-bf16-intel.d: Ditto. * testsuite/gas/i386/avx10_2-512-bf16.d: Ditto. * testsuite/gas/i386/avx10_2-512-bf16.s: Ditto. * testsuite/gas/i386/x86-64-avx10_2-256-bf16-intel.d: Ditto. * testsuite/gas/i386/x86-64-avx10_2-256-bf16.d: Ditto. * testsuite/gas/i386/x86-64-avx10_2-256-bf16.s: Ditto. * testsuite/gas/i386/x86-64-avx10_2-512-bf16-intel.d: Ditto. * testsuite/gas/i386/x86-64-avx10_2-512-bf16.d: Ditto. * testsuite/gas/i386/x86-64-avx10_2-512-bf16.s: Ditto. opcodes/ * i386-dis-evex-prefix.h: Update PREFIX_EVEX_0F3A08, PREFIX_EVEX_0F3A26, PREFIX_EVEX_0F3A56, PREFIX_EVEX_0F3A66, PREFIX_EVEX_0F3AC2, PREFIX_EVEX_MAP5_2F, PREFIX_EVEX_MAP5_51, PREFIX_EVEX_MAP5_58, PREFIX_EVEX_MAP5_59, PREFIX_EVEX_MAP5_5C, PREFIX_EVEX_MAP5_5D, PREFIX_EVEX_MAP5_5E, PREFIX_EVEX_MAP5_5F. Add PREFIX_EVEX_MAP6_2C, PREFIX_EVEX_MAP6_4C, PREFIX_EVEX_MAP6_4E, PREFIX_EVEX_MAP6_98, PREFIX_EVEX_MAP6_9A, PREFIX_EVEX_MAP6_9C, PREFIX_EVEX_MAP6_9E, PREFIX_EVEX_MAP6_A8, PREFIX_EVEX_MAP6_AA, PREFIX_EVEX_MAP6_AC, PREFIX_EVEX_MAP6_AE, PREFIX_EVEX_MAP6_B8, PREFIX_EVEX_MAP6_BA, PREFIX_EVEX_MAP6_BC, PREFIX_EVEX_MAP6_BE. * i386-dis-evex.h (evex_table): Update PREFIX_EVEX_MAP6_2C, PREFIX_EVEX_MAP6_42, PREFIX_EVEX_MAP6_4C, PREFIX_EVEX_MAP6_4E, PREFIX_EVEX_MAP6_98, PREFIX_EVEX_MAP6_9A, PREFIX_EVEX_MAP6_9C, PREFIX_EVEX_MAP6_9E, PREFIX_EVEX_MAP6_A8, PREFIX_EVEX_MAP6_AA, PREFIX_EVEX_MAP6_AC, PREFIX_EVEX_MAP6_AE, PREFIX_EVEX_MAP6_B8, PREFIX_EVEX_MAP6_BA, PREFIX_EVEX_MAP6_BC, PREFIX_EVEX_MAP6_BE. * i386-dis.c (PREFIX_EVEX_MAP6_2C): New enum. (PREFIX_EVEX_MAP6_42): Ditto. (PREFIX_EVEX_MAP6_4C): Ditto. (PREFIX_EVEX_MAP6_4E): Ditto. (PREFIX_EVEX_MAP6_98): Ditto. (PREFIX_EVEX_MAP6_9A): Ditto. (PREFIX_EVEX_MAP6_9C): Ditto. (PREFIX_EVEX_MAP6_9E): Ditto. (PREFIX_EVEX_MAP6_A8): Ditto. (PREFIX_EVEX_MAP6_AA): Ditto. (PREFIX_EVEX_MAP6_AC): Ditto. (PREFIX_EVEX_MAP6_AE): Ditto. (PREFIX_EVEX_MAP6_B8): Ditto. (PREFIX_EVEX_MAP6_BA): Ditto. (PREFIX_EVEX_MAP6_BC): Ditto. (PREFIX_EVEX_MAP6_BE): Ditto. (putop): Handle %XB. * i386-opc.tbl: Add AVX10.2 instructions. * i386-mnem.h: Regenerated. * i386-tbl.h: Ditto. Co-authored-by: Haochen Jiang <haochen.jiang@intel.com>
2024-12-03Automatic date update in version.inGDB Administrator1-1/+1
2024-12-02gdb/configure.ac: remove elf_hp.h checkSimon Marchi3-7/+0
The comment says this is for HP/UX, which is no longer supported. There should be no functional changes with this, since nothing checks HAVE_ELF_HP_H. Change-Id: Ie897fc64638c9fea28463e1bf69e450c3673fd84
2024-12-02gdb, gdbserver, gdbsupport: flatten and sort some list in configure filesSimon Marchi6-59/+298
This makes the lists easier sort read and modify. There are no changes in the generated config.h files, so I'm confident this brings no functional changes. Change-Id: Ib6b7fc532bcd662af7dbb230070fb1f4fc75f86b
2024-12-02aarch64: add tests for combinations of GCS options and marked/unmarked inputsMatthieu Longo25-0/+268
2024-12-02aarch64: add tests to check the correct merge of the GCS feature with others.Matthieu Longo10-5/+80
2024-12-02aarch64: GCS feature check in GNU note properties for input objectsSrinath Parvathaneni7-14/+224
This patch adds support for Guarded Control Stack in AArch64 linker. This patch implements the following: 1) Defines GNU_PROPERTY_AARCH64_FEATURE_1_GCS bit for GCS in GNU_PROPERTY_AARCH64_FEATURE_1_AND macro. 2) Adds readelf support to read and print the GCS feature in GNU properties in AArch64. Displaying notes found in: .note.gnu.property [ ]+Owner[ ]+Data size[ ]+Description GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 Properties: AArch64 feature: GCS 3) Adds support for the "-z gcs" linker option and document all the values allowed with this option (-z gcs[=always|never|implicit]) where "-z gcs" is equivalent to "-z gcs=always". When '-z gcs' option is omitted from the command line, it defaults to "implicit" and relies on the GCS feature marking in GNU properties. 4) Adds support for the "-z gcs-report" linker option and document all the values allowed with this option (-z gcs-report[=none|warning|error]) where "-z gcs-report" is equivalent to "-z gcs-report=warning". When this option is omitted from the command line, it defaults to "warning". The ABI changes adding GNU_PROPERTY_AARCH64_FEATURE_1_GCS to the GNU property GNU_PROPERTY_AARCH64_FEATURE_1_AND is merged into main and can be found in [1]. [1] https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst Co-authored-by: Matthieu Longo <matthieu.longo@arm.com> Co-authored-by: Yury Khrustalev <yury.khrustalev@arm.com>
2024-12-02aarch64: rename BTI error/warning messageMatthieu Longo13-20/+20
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.
2024-12-02aarch64: delete duplicated BTI testsMatthieu Longo6-117/+0
2024-12-02aarch64: improve test coverage for combination of BTI optionsMatthieu Longo19-5/+281
2024-12-02aarch64: limit number of reported issues on missing GNU propertiesMatthieu Longo3-0/+35
This patch attempts to make the linker output more friendly for the developers by limiting the number of emitted warning/error messages related to BTI issues. Every time an error/warning related to BTI is emitted, the logger also increments the BTI issues counter. A batch of errors/warnings is limited to a maximum of 20 explicit errors/warnings. At the end of the merge, a summary of the total of errors/warning is given if the number exceeds the limit of 20 invidual messages.
2024-12-02aarch64: bugfix when finding 1st bfd input with GNU propertyMatthieu Longo1-1/+6
The current implementation of searching the first input BFD with GNU properties has a bug. The search was not filtering on object inputs belonging to the output link unit only, but was also including dynamic objects, BFD plugins, and linker-created files. This means that the initial initialization of the output properties were skewed, and warnings on input files that should have been emitted were not. This patch fixes the filtering to exclude the object input files not belonging to the output link unit, not having the same ELF class, and not the same target architecture.
2024-12-02aarch64: remove early exit when setting up GNU properties with partial linkingMatthieu Longo1-3/+0
There is an early exit in _bfd_aarch64_elf_link_setup_gnu_properties that is enabled when the output link unit is relocatable, i.e. ld generates an output file that can in turn serve as input to ld. (see ld manual, -r,--relocatable for more details). At this stage, the GNU properties have already been merged and errors or warnings (if any) have already been issued. However, OUTPROP has not been updated yet. Not updating OUTPROP means that implicits enablement of BTI PLTs via the GNU properties will be ignored for final links. Indeed, the enablement of BTI PLTs is checked inside _bfd_aarch64_add_call_stub_entries by looking up at gnu_property_aarch64_feature_1_and (OUTPROP). Since the final link does not happen in the case of partial linking, the behaviour with or without the early exit should be the same. Given that there is currently no comment for explain why the exit is there, and that there might in the future be cases were these properties affect relocatable links, it is preferrable to drop the early exit.
2024-12-02aarch64: refactoring _bfd_aarch64_elf_link_setup_gnu_properties (part 5)Matthieu Longo1-18/+24
Use _bfd_aarch64_elf_check_bti_report to report any BTI issue on the first input object.
2024-12-02aarch64: refactoring _bfd_aarch64_elf_link_setup_gnu_properties (part 4)Matthieu Longo1-22/+27
Move the code related to the creation of the gnu.note section to a separate function: _bfd_aarch64_elf_create_gnu_property_section
2024-12-02aarch64: refactoring _bfd_aarch64_elf_link_setup_gnu_properties (part 3)Matthieu Longo1-16/+34
Move the code related to the search of the first bfd input with GNU properties to a separate function: _bfd_aarch64_elf_find_1st_bfd_input_with_gnu_property
2024-12-02aarch64: refactoring _bfd_aarch64_elf_link_setup_gnu_properties (part 2)Matthieu Longo1-9/+10
Simplify this for-loop with too many "break" instructions inside.
2024-12-02aarch64: refactoring _bfd_aarch64_elf_check_bti_reportMatthieu Longo3-11/+12
Before this patch, warnings were reported normally, and errors (introduced by a previous patch adding '-z bti-report' option) were logged as error but were not provoking a link failure. The root of the issue was a misuse of _bfd_error_handler to report the errors. Replacing _bfd_error_handler by info->callbacks->einfo, with the addition of the formatter '%X' for errors fixed the issue.
2024-12-02aarch64: refactoring _bfd_aarch64_elf_link_setup_gnu_properties (part 1)Matthieu Longo3-33/+41
Exposing the output GNU property as a parameter of _bfd_aarch64_elf_link_setup_gnu_properties seems to break the encapsulation. The output GNU property update should be part of the function that sets up the GNU properties. This patch removes the parameter, and perform the update of the GNU property on the output object inside the function.
2024-12-02aarch64: rename gnu_and_prop to gnu_property_aarch64_feature_1_andMatthieu Longo2-19/+19
2024-12-02aarch64: simplify condition in elfNN_aarch64_merge_gnu_propertiesMatthieu Longo1-4/+2
The current condition used to check if a GNU feature property is set on an input object before the merge is a bit confusing. (aprop && !<something about aprop>) || !aprop It seems easier to understand if it is changed as follows: (!aprop || !<something about aprop>)
2024-12-02aarch64: rename parameter of _bfd_aarch64_elf_merge_gnu_propertiesMatthieu Longo1-9/+9
The current naming of the AArch64 feature GNU property of the output bfd does not reflect what it is. This patch renames it from "prop" to "outprop".
2024-12-02aarch64: update ld documentation with bti and pac optionsMatthieu Longo1-0/+28
2024-12-02aarch64: use only one type for feature marking reportMatthieu Longo4-23/+29
2024-12-02aarch64: group software protection options under a same struct.Matthieu Longo4-83/+138
- declare a new struc aarch_protection_opts to store all the configuration options related to software protections (i.e. bti-plt, pac-plt, bti-report level). - add a new option "-z bti-report" to configure the log level of reported issues when BTI PLT is forced. - encapsulate the BTI report inside _bfd_aarch64_elf_check_bti_report.
2024-12-02aarch64: adapt BTI tests to use selectable GNU propertiesMatthieu Longo10-125/+35
2024-12-02aarch64: adapt bti-far* tests to use selectable GNU propertiesMatthieu Longo10-118/+77
2024-12-02aarch64: adapt tests for PAC PLT to use selectable GNU propertiesMatthieu Longo3-4/+43
2024-12-02aarch64: delete old tests for PAC & BTI PLTMatthieu Longo2-70/+0
2024-12-02aarch64: new tests for BTI & PAC PLT to use selectable GNU propertiesMatthieu Longo7-0/+224