This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Replace Elf64_XXX with ElfW(XXX) in dl-irel.h


> This patch replaces Elf64_XXX with ElfW(XXX) in dl-irel.h.  It also
> uses ELF32_R_TYPE:
> 
> #define ELF32_R_TYPE(val)		((val) & 0xff)
> 
> instead ELF64_R_TYPE:
> 
> #define ELF64_R_TYPE(i)			((i) & 0xffffffff)
> 
> gets the currect relocation type for both ELF32 and ELF64 for x86-64 since
> x86-64 relocation type is less than 256.  OK to install?

That is a kludgey and dangerous assumption.  It would be better to have an
ELFW macro like ElfW, so you can use "ELFW(R_TYPE) (reloc->r_info)".  It's
probably not a good idea to add a name like ELFW to the public header, even
though ElfW is already there.  So the new macro would go in include/link.h.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]