This is the mail archive of the mailing list for the binutils 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] MIPS/BFD: Fix n64 GOT header size in the ELF backend

"Maciej W. Rozycki" <> writes:
>  I've noticed the MIPS backend does not set the size of the GOT header 
> correctly in the ELF backend structure for the n64 ABI.  This is mostly 
> harmless because the MIPS backend does not use the value from the 
> structure and hardcoded the header size to twice the GOT entry size.  
> Furthermore the MIPS backend does not use the generic GOT creation 
> function (_bfd_elf_create_got_section) so it escapes damage there too.
>  However the size from the ELF backend structure is still used in linker 
> garbage collection (bfd_elf_gc_common_finalize_got_offsets) that the MIPS 
> backend does use, although GC is not on by default.  Therefore I propose 
> to fix it as below and make the MIPS backend use the GOT header size from 
> the ELF backend structure too so that there is a central place everything 
> depends on and any breakage is easily noticed.

Definitely.  Less hard-coded stuff == good.

> 	bfd/
> 	* elf64-mips.c (elf_backend_got_header_size): Correct definition.
> 	* elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF
> 	backend's GOT header size instead of hardcoding it.

OK, thanks.


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