[PATCH] Add bigobj support to AArch64 COFF

Jan Beulich jbeulich@suse.com
Fri Sep 26 06:04:11 GMT 2025


On 24.09.2025 20:13, Evgeny Karpov wrote:
> --- a/bfd/config.bfd
> +++ b/bfd/config.bfd
> @@ -252,7 +252,7 @@ case "${targ}" in
>      ;;
>    aarch64-*-pe* | aarch64-*-mingw*)
>      targ_defvec=aarch64_pe_le_vec
> -    targ_selvecs="aarch64_pe_le_vec aarch64_pei_le_vec
> aarch64_elf64_le_vec aarch64_elf64_be_vec aarch64_elf32_le_vec
> aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec pdb_vec"
> +    targ_selvecs="aarch64_pe_le_vec aarch64_pei_le_vec
> aarch64_pe_big_vec aarch64_elf64_le_vec aarch64_elf64_be_vec
> aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec
> arm_elf32_be_vec pdb_vec"

There's no endianness indicator in the new name; in fact "big" in the name thus
ends up ambiguous.

Note also that your patch came through line-wrapped.

> --- a/bfd/pe-aarch64.c
> +++ b/bfd/pe-aarch64.c
> @@ -23,6 +23,8 @@
> 
>  #define TARGET_SYM             aarch64_pe_le_vec
>  #define TARGET_NAME            "pe-aarch64-little"
> +#define TARGET_SYM_BIG         aarch64_pe_big_vec
> +#define TARGET_NAME_BIG        "pe-aarch64-bigobj"

Same issue noticeable here.

> --- a/gas/config/tc-aarch64.c
> +++ b/gas/config/tc-aarch64.c
> @@ -10210,6 +10210,11 @@ aarch64_after_parse_args (void)
>  #endif
>  }
> 
> +#ifdef OBJ_COFF
> +/* Use big object file format.  */
> +static int use_big_obj = 0;

bool (and then false here and true below) please.

> @@ -11287,6 +11302,11 @@ md_show_usage (FILE * fp)
>    fprintf (fp, _("\
>    -EL                     assemble code for a little-endian cpu\n"));
>  #endif
> +
> +#ifdef OBJ_COFF
> +  fprintf (fp, _("\
> +  -mbig-obj               generate big object files\n"));
> +#endif
>  }

This will want accompanying by a doc update.

> --- a/gas/testsuite/gas/pe/big-obj.d
> +++ b/gas/testsuite/gas/pe/big-obj.d
> @@ -2,7 +2,7 @@
>  #objdump: -h
>  #name: PE big obj
> 
> -.*: *file format pe-bigobj-.*
> +.*: *file format (pe-bigobj-.*|pe-aarch64-bigobj)

This also suggests a naming inconsistency.

Jan


More information about the Binutils mailing list