[PATCH] Allow STT_SECTION + offset for SHF_MERGE sections (fix)

Alan Modra amodra@bigpond.net.au
Tue Nov 27 15:21:00 GMT 2001


On Tue, Nov 27, 2001 at 03:05:54PM -0500, Jakub Jelinek wrote:

Looks OK to me, although I won't pretend to have looked to hard at the
various backend patches.  Poke the target maintainers for a response
(or wait a day then commit).

> +  addr_name = alloca (len);
> +  sprintf (addr_name, "%p:%lx",
> +	   (void *) abfd, (unsigned long) ELFNN_R_SYM (rel->r_info));

I know this isn't your code, but using the address of the bfd is a bad
idea.  The problem is that the address can easily vary between different
incarnations of the linker.  That makes the symbol hash differently and
possibly emit in a different order.  ie. Random changes in the binary
for no good reason.

Alan



More information about the Binutils mailing list