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] |
| Other format: | [Raw text] | |
Hi,
The following patch fixes a bug in CRX relaxation, regarding the --wrap
linker's option.
The '--wrap SYMBOL' option is causing a pain when the object file,
containing the definition of __wrap_SYMBOL, includes a direct call to
SYMBOL as well :
void *
__wrap_malloc (size_t n)
{
printf ("malloc called with %zu\n", n);
return __real_malloc (n);
}
int
main (void)
{
return malloc (100) == 0;
}
Since both __wrap_SYMBOL and SYMBOL reference the same symbol (which is
__wrap_SYMBOL), but still exist as two different symbols in 'sym_hashes',
we don't want to adjust the global symbol __wrap_SYMBOL twice when
relaxing.
This change also involves a change in 'elf32_crx_relax_delete_bytes'
prototype.
Here is the ChangeLog :
2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
* elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct
bfd_link_info *' to prototype, to make hash info available.
Prevent wrapped symbols from being adjusted twice.
Committed and checked using compiler internal testsuite.
Regards,
Tomer Levi
Software Engineer phone:
+49-8141-35-1378
CompactRISC Development Tools fax: +49-8141-35-11-1378
National Semiconductor GmbH mailto:Tomer.Levi@nsc.com
Livry-Gargan Str. 10 internet:
http://www.national.com
82256 Fuerstenfeldbruck, Germany
Attachment:
elf32-crx.c.patch
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |