This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gas lobotomy, .bss section optimization
- To: "Adam J. Richter" <adam at yggdrasil dot com>
- Subject: Re: gas lobotomy, .bss section optimization
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 01 May 2001 10:48:53 -0700
- Cc: binutils at sourceware dot cygnus dot com
- References: <200105011427.HAA01641@adam.yggdrasil.com>
"Adam J. Richter" <adam@yggdrasil.com> writes:
> Anyhow, my question is this: for BFD_RELOC_32 type relocations
> that cross section boundaries (so a relocation record will be generated
> either way), is there any advantage to having gas translate those
> relocations from being relative to a symbol in, say, .data, to something
> like ".data+0x50". Does it actually help ld run faster? Does it make
> the resulting .o smaler? I understand that, within the same section,
> you can eliminate a relocation record, but, for references across
> section, it seems like a waste of CPU cycles to do that translation
> and it produces less informative output.
Yes, there is an advantage. If you keep the relocation against the
symbol, then you must keep the symbol in the symbol table. If you do
not, you can often otherwise discard it, saving space in the object
file and time reading and writing the object file. In a big file,
this can be a lot of symbols.
Incidentally, I'm not sure your patch will work in all cases. I think
the only way which is certain to work is to have
tc_i386_fix_adjustable always return 0.
Ian