This is the mail archive of the binutils@sources.redhat.com 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]

Re: Patch for elf32-sh.c


Hi Bernd,

: 	* elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.

Approved.

Ian is right.  This variable really should not be static, but stored
in a BFD accessible structure somewhere.  Since however the code
already uses another static variable 'last_addr', and since it is
obvious that it was intended that both of these variables be static,
I am willing to approve the patch.

Of course if you are feeling helpful, you could rewrite the code to
store the information in the bfd.  The normal way to do this is to
extend the link_hash_table table structure that is pointed to by the
bfd_link_info pointer.  (see elf32-arm.h for a good example if this).
Although this structure is not passed to the sh_elf_reloc_loop()
function, it is passed to that function's only parent, so you could
easily add an extra argument to pass in the information.

Cheers
	Nick



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