[PATCH] LD/PE: Remove remains of MIPS target support
Jan Beulich
jbeulich@suse.com
Mon Aug 18 10:21:10 GMT 2025
On 18.08.2025 12:12, Maciej W. Rozycki wrote:
> On Mon, 18 Aug 2025, Jan Beulich wrote:
>
>>>> 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?
>
> I agree. Would the cc'd maintainers of the other PE targets please
> confirm or deny that these high-part/low-part relocations are used by
> their respective platforms (ISTM they are not, so I chose to remove that
> code as dead with the removal of MIPS support, but I'll appreciate a
> second opinion)?
Sadly by experience I wouldn't expect any replies there. But maybe I can
be positively surprised ...
(My personal take is that at least the "case BITS_AND_SHIFT (16, 0):"
part may better be left in.)
Jan
More information about the Binutils
mailing list