aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-11-21gdb/python: add section in documentation on implementing JIT interfaceusers/jv/feature-py-jit-api-gen2Jan Vrany6-1/+356
This commit adds new section - JIT Interface in Python - outlining how to use Python APIs introduced in previous commits to implement simple JIT interface. It also adds new test to make sure the example code is up-to-date. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: allow instantiation of gdb.LineTable objectsJan Vrany3-4/+140
This commit allows users to instantiate gdb.LineTable objects. This is a step towards a Python support for dynamically generated code (JIT) in GDB. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: allow instantiation of gdb.LineTableEntry objectsJan Vrany3-8/+77
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: add more attributes to gdb.LinetableEntry objectsJan Vrany3-12/+116
This commit adds is_stmt, prologue_end and epilogue_begin attributes to linetable entry objects. This prompted change in gdb.Linetable.line() (ltpy_get_pcs_for_line). In order to fill initialize new attributes we need complete entries matching the line, not only PCs. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: add add_symbol () method to gdb.BlockJan Vrany3-6/+71
This commit adds new method add_symbol () to gdb.Block objects. A typical use of it is to add previously instantiated gdb.Symbol object to block when interfacing with JIT compiler. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: allow instantiation of gdb.Symbol from PythonJan Vrany5-1/+201
This commit adds code to allow user extension to instantiate gdb.Symbol. As of now only "function" symbols can be created (that is: symbols of FUNCTION_DOMAIN and with address class LOC_BLOCK). This is enough to be able to implement "JIT reader" equivalent in Python. Future commits may extend this API to allow creation of other kinds of symbols (static variables, arguments, locals and so on). Like previous similar commits, this is a step towards a Python support for dynamically generated code (JIT) in GDB. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: allow instantiation of gdb.Block from PythonJan Vrany3-2/+138
This commit adds code to allow user extension to instantiate gdb.Block. This is a step towards a Python support for dynamically generated code (JIT) in GDB. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: allow instantiation of gdb.Symtab from PythonJan Vrany3-2/+70
This commit adds code to allow user extension to instantiate gdb.Symtab. This is a step towards a Python support for dynamically generated code (JIT) in GDB. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: allow instantiation of gdb.Compunit from PythonJan Vrany5-3/+167
This commit adds code to allow user extension to instantiate gdb.Compunit. This is a step towards a Python support for dynamically generated code (JIT) in GDB. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: add unlink () method to gdb.Objfile objectJan Vrany3-0/+36
This commit adds method allowing one remove any objfile. This is meant to be used to remove objfiles for dynamic code when this dynamic code is discarded. However gdb.Objfile.unlink() makes no attempt to ensure this - to make it consistent with other Python API to create and modify objfiles related structures (compunits, symbol tables and so on). Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: allow instantiation of gdb.Objfile from PythonJan Vrany5-4/+169
This commit adds code to allow user extension to instantiate gdb.Objfile. This is a step towards a Python support for dynamically generated code (JIT) in GDB. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: add gdb.CompunitJan Vrany11-0/+524
This commit introduces gdb.Compunit - a representation of struct compunit_symtab in Python. It also adds method gdb.Objfile.compunits() to get a list of compunits for an objfile and adds compunit attribute to gdb.Block and gdb.Symtab to access compunit containing given block or symbol table. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb: use std::vector<> to hold on blocks in struct blockvectorJan Vrany6-57/+156
This commit changes internal implementation of struct blockvector to use std::vector<> rather than flexible array. The main motivation for this change is to simplify adding blocks to existing symtab. This feature will be used later by Python API to build objfiles, compunits and symtabs dynamically (similarly to JIT reader API). To do so, this commit 1. introduces obstack_allocator, an implementation of Allocator concept that allocates memory on obstack. 2. uses std::vector<> with the above allocator to hold on blocks 3. updates users. As a side-effect of this change, blockvectors allocated in mdebugread.c are obstack-allocated rather than xzalloc()ated which seems to be the correct thing to do. Also, code got simpler. The downside is higher memory consumption. The size of std::vector with obstack allocator is 32 bytes (GCC 14) compared to 8 bytes used currently to store the number of blocks (m_num_blocks). Stopping gdb at its main(), followed by "maint expand-symtabs" results in 4593 compunit symtabs so in this case the overhead is 24*4593 = 110232 bytes which I hope is acceptable. Maybe more concerning is the fact that one may waste obstack memory when excessively adding blocks. However, blockvectors are not added blocks after initial allocation at the moment (except in mdebugread.c) so this is not a problem for existing code. To to mitigate this issue code allocating may capacity - a number of blocks the blockvector may hold without reallocating.
2024-11-21gdb/python: make gdb.Symtab comparable for equalityJan Vrany2-1/+23
Like previous patch, but for gdb.Symtab.
2024-11-21gdb/python: make gdb.Symbol comparable for equalityJan Vrany2-1/+23
In subsequent patches, it will be useful to be able to compare two gdb.Symbols. This patch makes gdb.Symbols equal iff both refer to the same underlying struct symtab.
2024-11-21gdb/python: add template function to implement equality comparisonJan Vrany1-0/+33
This commit adds gdbpy_richcompare template to implement "default" equality and non-equality comparison for GDB Python objects. The "default" behavior is to consider two GDB Python objects as equal if both refer to the same underlying GDB structure.
2024-11-21gdb/python: add function () method to gdb.Type objectJan Vrany4-0/+85
This commit adds a new method to Python type objects that returns possibly new function type returning that type. Parameter types can be specified too. This will be useful later to create types for function symbols created using Python extension code. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: add void_type () method to gdb.Architecture objectJan Vrany4-0/+27
This commit adds a new method to Python architecture objects that returns a void type for that architecture. This will be useful later to create types for function symbols created using Python extension code. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: add domain property to gdb.SymbolJan Vrany4-0/+19
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb/python: add subblocks property to gdb.BlockJan Vrany4-0/+42
This commit adds new propery "subblocks" to gdb.Block objects. This allows Python to traverse block tree starting with global block. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-11-21gdb: update is_addr_in_objfile to support "dynamic" objfilesJan Vrany2-0/+25
While working with objfiles in Python I noticed that gdb.Progspace.objfile_for_address () does not return "dynamic" objfile create by (for example) GDB's JIT reader API. This is because is_addr_in_objfile() checks if given address falls into any (mappped) section of that objfile. However objfiles created by JIT reader API do not have sections. To solve this issue, this commit updates is_addr_in_objfile() to also check if address fall into any compunit if that objfile. It does so only if objfile has no sections.
2024-11-21testsuite: skip confirmation in 'gdb_reinitialize_dir'Rohr, Stephan1-2/+4
Some shells automatically confirm the 'dir' command: (gdb) dir Reinitialize source path to empty? (y or n) [answered Y; input not from terminal] Source directories searched: $cdir;$cwd (gdb) y dir <...>/gdb/testsuite/gdb.base Undefined command: "y". Try "help". For example, this reprdocues in a MinGW32 environment with 'TERM=dumb'. Skip sending 'y' if the command is already confirmed. Approved-By: Tom Tromey <tom@tromey.com>
2024-11-21Automatic date update in version.inGDB Administrator1-1/+1
2024-11-20PowerPC: Add support for RFC02677 - VSX Vector Rotate Left WordPeter Bergner3-0/+3
opcodes/ * ppc-opc.c (powerpc_opcodes): Add xvrlw. gas/ * testsuite/gas/ppc/future.s: Add test for xvrlw. * testsuite/gas/ppc/future.d: Likewise.
2024-11-20Improve choice sorting in ada-lang.cTom Tromey3-79/+58
ada-lang.c has a "sort_choices" function that claims to sort the symbol choices, but which does not really implement sorting. This patch changes this code to really sort the result vector, sorting first by filename, then line number, and finally by the symbol name. The filename sorting is done first by comparing basenames. It turns out that gnatmake and gprbuild invoke the compiler a bit differently, so depending on which one you use, the results of a naive sort might be different (due to the use of absolute or relative paths).
2024-11-20arm: Support pac_key_* register operand for MRS/MSR in Armv8.1-M MainlineAndre Vieira4-5/+258
Add support for pac_key_[pu]_[0-3](_ns)? register operands for the MRS and MSR instructions when assembling for Armv8.1-M Mainline, as well as adding the corresponding support for disassembling instructions that use it.
2024-11-20gdb: add Mohamed Bouhaouel to gdb/MAINTAINERSMohamed Bouhaouel1-0/+1
2024-11-20Remove Debian from SECURITY.txtNick Clifton1-1/+0
2024-11-20gdb/python: fix reference leak in gdb.BreakpointLocation.thread_groupsAndrew Burgess1-1/+1
While reviewing another patch which uses PyList_Append I took a look at our other uses of PyList_Append in GDB. I spotted something odd about the use in bplocpy_get_thread_groups. We do: gdbpy_ref<> num = gdb_py_object_from_ulongest (inf->num); At which point `num` will own a reference to the `int` object. But when we add the object to the result list we do: if (PyList_Append (list.get (), num.release ()) != 0) return nullptr; By calling `release` we pass ownership of the reference to PyList_Append, however, PyList_Append acquires its own reference, it doesn't take ownership of an existing reference. The consequence of this is that we leak the reference held in `num`. This mostly isn't a problem though. For small (< 257) integers Python keeps a single instance of each and just hands out new references. By leaking the references, these small integers will not be cleaned up as the Python interpreter shuts down, but that is only done when GDB exits, so hardly a disaster. As we're dealing with GDB's internal inferior number here, unless the user has 257+ inferiors, we'll not actually be leaking memory. Still, lets do things right. Switch to using `num.get ()`. Now when `num` goes out of scope it will decrement the reference count as needed. Approved-By: Tom Tromey <tom@tromey.com>
2024-11-20RISC-V: Add Zcmt instructions and csr.Jiawei19-0/+144
This patch supports Zcmt[1] instruction 'cm.jt' and 'cm.jalt'. Add new CSR jvt for tablejump using. Since 'cm.jt' and 'cm.jalt' have the same instructiong encoding, use 'match_cm_jt' and 'match_cm_jalt' check the 'zcmt_index' field to distinguish them. [1] https://github.com/riscvarchive/riscv-code-size-reduction/releases Co-Authored by: Charlie Keaney <charlie.keaney@embecosm.com> Co-Authored by: Mary Bennett <mary.bennett@embecosm.com> Co-Authored by: Nandni Jamnadas <nandni.jamnadas@embecosm.com> Co-Authored by: Sinan Lin <sinan.lin@linux.alibaba.com> Co-Authored by: Simon Cook <simon.cook@embecosm.com> Co-Authored by: Shihua Liao <shihua@iscas.ac.cn> Co-Authored by: Yulong Shi <yulong@iscas.ac.cn> bfd/ChangeLog: * elfxx-riscv.c (riscv_multi_subset_supports): New extension. (riscv_multi_subset_supports_ext): Ditto. gas/ChangeLog: * config/tc-riscv.c (enum riscv_csr_class): New CSR. (riscv_csr_address): Ditto. (validate_riscv_insn): New operand. (riscv_ip): Ditto. * testsuite/gas/riscv/csr-version-1p10.d: New CSR. * testsuite/gas/riscv/csr-version-1p10.l: Ditto. * testsuite/gas/riscv/csr-version-1p11.d: Ditto. * testsuite/gas/riscv/csr-version-1p11.l: Ditto. * testsuite/gas/riscv/csr-version-1p12.d: Ditto. * testsuite/gas/riscv/csr-version-1p12.l: Ditto. * testsuite/gas/riscv/csr.s: Ditto. * testsuite/gas/riscv/march-help.l: New extension. * testsuite/gas/riscv/zcmt-fail.d: New test. * testsuite/gas/riscv/zcmt-fail.l: New test. * testsuite/gas/riscv/zcmt-fail.s: New test. * testsuite/gas/riscv/zcmt.d: New test. * testsuite/gas/riscv/zcmt.s: New test. include/ChangeLog: * opcode/riscv-opc.h (MATCH_CM_JT): New opcode. (MASK_CM_JT): New mask. (MATCH_CM_JALT): New opcode. (MASK_CM_JALT): New mask. (CSR_JVT): New CSR. (DECLARE_INSN): New declaration. (DECLARE_CSR): Ditto. * opcode/riscv.h (EXTRACT_ZCMT_INDEX): New marco. (ENCODE_ZCMT_INDEX): Ditto. (enum riscv_insn_class): New class. opcodes/ChangeLog: * riscv-dis.c (print_insn_args): New operand. * riscv-opc.c (match_cm_jt): New function. (match_cm_jalt): Ditto.
2024-11-20Automatic date update in version.inGDB Administrator1-1/+1
2024-11-19gdb: Remove inappropriate commentsCharles Baylis3-3/+3
Remove some inappropriate comments in darwin_nat_target::attach, gnu_nat_target::attach and inf_ptrace_target::attach. Tested by rebuilding on x86_64-linux. Copyright-paperwork-exempt: yes Approved-By: Tom Tromey <tom@tromey.com>
2024-11-19[gdb/contrib] Fix shellcheck warnings in spellcheck.shTom de Vries1-7/+7
Fix shellcheck warnings in spellcheck.sh, found using shellcheck v0.10.0. Ran shellcheck v0.10.0 (on a system with shellcheck version 0.8.0) using this command from an RFC patch [1]: ... $ ./gdb/contrib/pre-commit-shellcheck.sh ./gdb/contrib/spellcheck.sh ... Tested on x86_64-linux [1] https://sourceware.org/pipermail/gdb-patches/2024-November/213400.html
2024-11-19RISC-V: Don't report warnings when linking different privileged spec objects.Nelson Chu8-96/+3
Since only the abandoned privileged spec v1.9.1 will have conflict csrs, to keep the compatible we still report warnings when linking privileged spec v1.9.1 objects with others. But don't report warnings for other compatible cases because it is actually a bit noisy and useless... bfd/ * elfnn-riscv.c (riscv_merge_attributes): Only report warnings when linking the abandoned privileged spec v1.9.1 object with others. ld/ * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d: Removed. * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d: Removed. * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d: Removed. * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d: Removed. * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d: Removed. * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d: Removed. * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.
2024-11-19Support x86 Intel MSR_IMMHu, Lin118-844/+1059
gas/ChangeLog: * NEWS: Support x86 Intel MSR_IMM. * config/tc-i386.c (cpu_arch): Add MSR_IMM. (cpu_flags_match): Add MSR_IMM to APX_F related processing. (i386_assemble): WRMSRNS's first operand is imm32, so add MN_wrmsrns like MN_uwrmsr. * doc/c-i386.texi: Document .msr_imm. * testsuite/gas/i386/i386.exp: Run MSR_IMM tests. * testsuite/gas/i386/x86-64.exp: Ditto. * testsuite/gas/i386/msr_imm-inval.l: New test. * testsuite/gas/i386/msr_imm-inval.s: Ditto. * testsuite/gas/i386/x86-64-msr_imm-intel.d: Ditto. * testsuite/gas/i386/x86-64-msr_imm.d: Ditto. * testsuite/gas/i386/x86-64-msr_imm.s: Ditto. opcodes/ChangeLog: * i386-dis.c: Add REG_VEX_MAP7_F6_L_0_W_0, PREFIX_VEX_MAP7_F6_L_0_W_0_R_0_X86_64, X86_64_VEX_MAP7_F6_L_0_W_0_R_0, VEX_LEN_MAP7_F6, VEX_W_MAP7_F6_L_0. (reg_table): New entry for MSR_IMM. (prefix_table): Ditto. (x86_64_table): Ditto. (vex_len_table): Ditto. (vex_w_table): Ditto. (map7_f6_opcode): New variable for MAP7. (get_valid_dis386): Support MAP7. * i386-gen.c (cpu_flags): Add MSR_IMM. * i386-init.h: Regenerated. * i386-mnem.h: Ditto. * i386-opc.h (i386_cpu_flags): Add cpumsr_imm. * i386-opc.tbl: Add MSR_IMM instructions. * i386-tbl.h: Regenerated.
2024-11-19LoongArch: Do not relax pcalau12i+ld.d when there is overflowLulu Cai5-5/+156
There is no overflow check for the relaxation of pcalau12i+ld.d => pcalau12i+addi.d. For instruction sequences that can be relaxed, they are directly relaxed to pcalau12i+addi.d. However, when the relative distance between the symbol and the pc exceeds the 32-bit range, the symbol value cannot be obtained correctly. Adds an overflow check for the relaxation of pcalau12i+ld.d. If it is found that the relaxation will overflow, it will not be relaxed.
2024-11-19Automatic date update in version.inGDB Administrator1-1/+1
2024-11-18aarch64: renaming of arm to AArch64Matthieu Longo1-2/+2
2024-11-18aarch64: remove annoying white spaces in bfd/elfnn-aarch64.cMatthieu Longo1-2/+2
2024-11-18LAM: Enable tagged pointer support for watchpoints.Christina Schimpe5-0/+228
The Intel (R) linear address masking (LAM) feature modifies the checking applied to 64-bit linear addresses. With this so-called "modified canonicality check" the processor masks the metadata bits in a pointer before using it as a linear address. LAM supports two different modes that differ regarding which pointer bits are masked and can be used for metadata: LAM 48 resulting in a LAM width of 15 and LAM 57 resulting in a LAM width of 6. This patch adjusts watchpoint addresses based on the currently enabled LAM mode using the untag mask provided in the /proc/<pid>/status file. As LAM can be enabled at runtime or as the configuration may change when entering an enclave, GDB checks enablement state each time a watchpoint is updated. In contrast to the patch implemented for ARM's Top Byte Ignore "Clear non-significant bits of address on memory access", it is not necessary to adjust addresses before they are passed to the target layer cache, as for LAM tagged pointers are supported by the system call to read memory. Additionally, LAM applies only to addresses used for data accesses. Thus, it is sufficient to mask addresses used for watchpoints. The following examples are based on a LAM57 enabled program. Before this patch tagged pointers were not supported for watchpoints: ~~~ (gdb) print pi_tagged $2 = (int *) 0x10007ffffffffe004 (gdb) watch *pi_tagged Hardware watchpoint 2: *pi_tagged (gdb) c Continuing. Couldn't write debug register: Invalid argument. ~~~~ Once LAM 48 or LAM 57 is enabled for the current program, GDB can now specify watchpoints for tagged addresses with LAM width 15 or 6, respectively. Approved-By: Felix Willgerodt <felix.willgerodt@intel.com>
2024-11-18gdb: Make tagged pointer support configurable.Christina Schimpe9-46/+168
The gdbarch function gdbarch_remove_non_address_bits adjusts addresses to enable debugging of programs with tagged pointers on Linux, for instance for ARM's feature top byte ignore (TBI). Once the function is implemented for an architecture, it adjusts addresses for memory access, breakpoints and watchpoints. Linear address masking (LAM) is Intel's (R) implementation of tagged pointer support. It requires certain adaptions to GDB's tagged pointer support due to the following: - LAM supports address tagging for data accesses only. Thus, specifying breakpoints on tagged addresses is not a valid use case. - In contrast to the implementation for ARM's TBI, the Linux kernel supports tagged pointers for memory access. This patch makes GDB's tagged pointer support configurable such that it is possible to enable the address adjustment for a specific feature only (e.g memory access, breakpoints or watchpoints). This way, one can make sure that addresses are only adjusted when necessary. In case of LAM, this avoids unnecessary parsing of the /proc/<pid>/status file to get the untag mask. Reviewed-By: Felix Willgerodt <felix.willgerodt@intel.com> (AArch64) Tested-By: Luis Machado <luis.machado@arm.com> Approved-By: Luis Machado <luis.machado@arm.com>
2024-11-18x86: rename SPACE_{,E}VEX_MAP<N>Jan Beulich5-765/+765
Map7 already has dual purpose for USER-MSR (and is to gain more for MSR-IMM), while Map5 is about to gain VEX uses for AMX extensions. Drop the not really meaningful infixes and (in the opcode table) prefixes, retaining merely EVexMap4 for encoding EVex128 at the same time.
2024-11-18x86: VP2INTERSECT{D,Q} have mask register destination groupJan Beulich18-247/+296
Much like AVX512-{4FMAPS,4VNNIW} have a constraint on their register source, there's a constraint (need to be even) on the destination register here. Adjust "good" test cases accordingly, and add a new test case to check the warning.
2024-11-18x86: generalize "implicit quad group" handlingJan Beulich8-43/+79
We'll want to re-use it for VP2INTERSECT{D,Q}. While there add a testcase for the similarly affected AVX512-4VNNIW insns.
2024-11-18[gdb/contrib] Fix spellcheck.sh for bash < 5.1Tom de Vries1-2/+44
Since commit 5cb0406bb64 ("[gdb/contrib] Handle capitalized words in spellcheck.sh"), spellcheck.sh uses '${pat@u}' which is available starting bash 5.1, and consequently the script breaks with bash 4.4. Fix this by checking for the bash version, and using an alternative implementation for bash < 5.1. Tested on x86_64-linux.
2024-11-18ld: Support percent-encoded JSON in --package-metadataBenjamin Drung7-2/+140
Specifying the compiler flag `-Wl,--package-metadata=<JSON>` will not work in case the JSON contains a comma, because compiler drivers eat commas. Example: ``` $ echo "void main() { }" > test.c $ gcc '-Wl,--package-metadata={"type":"deb","os":"ubuntu"}' test.c /usr/bin/ld: cannot find "os":"ubuntu"}: No such file or directory collect2: error: ld returned 1 exit status ``` The quotation marks in the JSON value do not work well with shell nor make. Specifying the `--package-metadata` linker flag in a `LDFLAGS` environment variable might loose its quotation marks when it hits the final compiler call. So support percent-encoded and %[string] encoded JSON data in the `--package-metadata` linker flag. Percent-encoding is used because it is a standard, simple to implement, and does take too many additional characters. %[string] encoding is supported for having a more readable encoding. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32003 Bug-Ubutru: https://bugs.launchpad.net/bugs/2071468 Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2024-11-18gas: move had_errors() invocation in finishing of subsegsJan Beulich1-6/+6
Invoking this repeatedly in an inner loop is not only inefficient, but may lead to inconsistencies in e.g. the listings that the original comment author cared about. (Accept potential inconsistencies across distinct sections though, to cover all invocations of the function.)
2024-11-18ELF: SHF_STRINGS isn't really tied to SHF_MERGEJan Beulich4-25/+36
It's not overly useful without it, but the spec doesn't name any dependency between the two. People may want to use it for purely informational purposes, for example. Adjust, in particular, entity size processing to be engaged if either flag is set, as mandated by the spec.
2024-11-18ELF: SHF_MERGE vs SHT_NOBITSJan Beulich2-0/+4
bfd/merge.c puts in quite some effort to track mergable sections. That's all wasted for sections which don't have contents, as for them _bfd_write_merged_section() will never be called. With the combination not having any useful effect, also warn about this in gas.
2024-11-18gas/ELF: also reject merge entity size being zeroJan Beulich2-2/+2
This won't have any useful effect, so is at best marginally less bogus than a negative value. The change actually points out a flawed (for Arm) testcase: @ is a comment character there.