[EXTERNAL] Re: [PATCH 1/5] strip: Adapt src/strip -o -f on mips

Luke Diamand ldiamand@roku.com
Tue May 16 08:05:49 GMT 2023



On 09/05/2023 16:15, Mark Wielaard wrote:
> Hi,
> 
> On Tue, 2023-04-11 at 16:12 +0800, Ying Huang wrote:
>> From: Ying Huang <ying.huang@oss.cipunited.com>
>>
>> In mips64 little-endian, r_info consists of four byte fields(contains
>> three reloc types) and a 32-bit symbol index. In order to adapt
>> GELF_R_SYM and GELF_R_TYPE, need convert raw data to get correct symbol
>> index and type.
> 
> Is there a spec that describes this?
> 
> I see you adjusted elf.h to include:
> 
> +#define ELF64_MIPS_R_TYPE(i)		((i) & 0xff)
> +#define ELF64_MIPS_R_TYPE2(i)           (((i) >> 8) & 0xff)
> +#define ELF64_MIPS_R_TYPE3(i)           (((i) >> 16) & 0xff)
> 

Is this patch intended to support 32 bit MIPS (and MIPSEL) ?

For me it did not work but I could see if I can add that in.

(From a very long time ago, I have some patches based on the debian MIPS 
support but I never managed to find time to upstream them, so this is 
great to finally see!)

Luke



More information about the Elfutils-devel mailing list