[PATCH v3 04/18] LD/testsuite: Expand archive verification to `--whole-archive' feature

Jan Beulich jbeulich@suse.com
Fri Dec 5 07:13:51 GMT 2025
On 04.12.2025 18:57, Maciej W. Rozycki wrote:
> On Thu, 4 Dec 2025, Jan Beulich wrote:
> 
>>> --- binutils-gdb.orig/ld/testsuite/ld-archive/archive.exp
>>> +++ binutils-gdb/ld/testsuite/ld-archive/archive.exp
>>> @@ -35,7 +35,7 @@ set old_ldflags $LDFLAGS
>>>  
>>>  # Prevent our otherwise unused data symbols from being GC'd on XCOFF targets.
>>>  if { [is_xcoff_format] } {
>>> -    append LDFLAGS " -bexpall"
>>> +    append LDFLAGS " -bexpfull"
>>>  }
>>
>> Without this change I would have approved the whole thing. As this looks to affect
>> existing testing, and as nothing is being said in the description towards the
>> modification, I fear I have to ask for clarification.
> 
>  This is an update to my own code recently added.  But in principle you're 
> right.  It's turned out `-bexpall' does not always prevent GC from running 
> and there's `-bexpfull' there meaning: "yes, really!"  Documentation is 
> scarce, to put it lightly, and amounts to this comment in bfd/xcofflink.c:
> 
>   /* Despite its name, -bexpall exports most but not all symbols.  */
> 
> So symbols were dropped regardless and it broke the common semantics the 
> tests cover.
> 
>  Now I've come across the `-unix' option too, so perhaps I'll use that 
> instead, to take an opportunity and give it light coverage, as it's not 
> used anywhere across the testsuite, and its name fits the spirit of the 
> tests I've made here.

Whichever way you go - the ultimate change is okay as long as a word is being
said in the description on this seemingly "extra" change.

Jan


More information about the Binutils mailing list