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: gas lobotomy, .bss section optimization


"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


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