Hi Ying,

On Tue, 2023-07-25 at 16:15 +0800, Ying Huang wrote:
> In file common-reloc.c, hook functions 
> reloc_type_check/reloc_type_use/reloc_type_name have these codes:
> 
> #ifdef RELOC_TYPE_ID
>   reloc = RELOC_TYPE_ID (reloc);
> #endif
> 
> And the macro RELOC_TYPE_ID was defined in file backends/sparc_init.c:
> 
> /* In SPARC some relocations use the most significative 24 bits of the
>    r_type field to encode a secondary addend.  Make sure the routines
>    in common-reloc.c acknowledge this.  */
> #define RELOC_TYPE_ID(type) ((type) & 0xff)
> 
> The contents of macro RELOC_TYPE_ID were same as ELF64_MIPS_R_TYPE(new 
> added), so my view is did not add new hook for mips, if we can do like sparc?

Sorry, hadn't seen this message before. But yes, if you can do like
sparc and define RELOC_TYPE_ID then that would be simpler than creating
a full new HOOK for reloc_type_check.

Cheers,

Mark

Reply via email to