[PATCH] LD/PE: Remove remains of MIPS target support
Jan Beulich
jbeulich@suse.com
Mon Aug 18 06:35:43 GMT 2025
On 07.08.2025 17:00, Jan Beulich wrote:
> On 07.08.2025 16:44, Maciej W. Rozycki wrote:
>> Support for ECOFF MIPS targets, including `mips*-*-pe*' among others,
>> has been removed from GAS and LD with commit e8044f355dc9 ("Remove gas
>> and ld support for MIPS ECOFF"),
>> <https://inbox.sourceware.org/binutils/8761x65bzx.fsf@talisman.default/>.
>> However bits in PEI-format DLL support code have been left behind.
>>
>> Remove the relevant pieces then, originally from commit 344a211f9995
>> ("Add support for WinCE based toolchains."), including MIPS architecture
>> parts and HI16/LO16 relocation support in particular.
>> ---
>> Hi,
>>
>> This has passed my usual verification, including `aarch64-pe', `arm-pe',
>> `arm-wince-pe', `i686-pe', `mcore-pe', `sh-pe', and `x86_64-mingw32'
>> targets among others. It can't be ruled out however that there are gaps
>> in coverage, so please let me know if you think there's anything I may
>> have overlooked with this change.
>>
>> Otherwise OK to apply?
>
> One question first: Is ...
>
>> @@ -1699,19 +1688,6 @@ generate_reloc (bfd *abfd, struct bfd_li
>> reloc_data[total_relocs].type = IMAGE_REL_BASED_HIGHLOW;
>> total_relocs++;
>> break;
>> - case BITS_AND_SHIFT (16, 0):
>> - reloc_data[total_relocs].type = IMAGE_REL_BASED_LOW;
>> - total_relocs++;
>> - break;
>> - case BITS_AND_SHIFT (16, 16):
>> - reloc_data[total_relocs].type = IMAGE_REL_BASED_HIGHADJ;
>> - /* FIXME: we can't know the symbol's right value
>> - yet, but we probably can safely assume that
>> - CE will relocate us in 64k blocks, so leaving
>> - it zero is safe. */
>> - reloc_data[total_relocs].extra = 0;
>> - total_relocs++;
>> - break;
>> case BITS_AND_SHIFT (26, 2):
>> reloc_data[total_relocs].type =
>> IMAGE_REL_BASED_ARM_MOV32;
>> @@ -1765,9 +1741,6 @@ generate_reloc (bfd *abfd, struct bfd_li
>> }
>>
>> reloc_sz += 2;
>> -
>> - if (reloc_data[i].type == IMAGE_REL_BASED_HIGHADJ)
>> - reloc_sz += 2;
>> }
>>
>> reloc_sz = (reloc_sz + 3) & ~3; /* 4-byte align. */
>
> ... all of this positively MIPS-only, i.e. not (unexpectedly) re-used by any
> other target?
As I'd like to see this go in, for me to then re-base my patch over it, can we
get this aspect sorted?
Jan
More information about the Binutils
mailing list