Linker relaxation and the size of the output section
Alan Modra
amodra@bigpond.net.au
Wed Oct 8 02:58:00 GMT 2003
I'd like to see _cooked_size replaced by a delta_size field, initially
set to zero. Instead of using
sec->_cooked_size != 0 ? sec->_cooked_size : sec->_raw_size
the linker would always calculate section size using
sec->_raw_size + sec->delta_size
Faster, simpler, and allows output size to shrink to zero. Do you feel
like doing a little editing? :-)
Hmm, the following uses of _cooked_size outsize of bfd/ and ld/ are a
little dubious (or at least unnecessary). I'm fairly certain that
nothing beside the linker needs to look at _cooked_size.
./gprof/corefile.c: + core_syms[i]->section->_cooked_size - 1, max_vma);
./gdb/hppa-tdep.c: && sec->vma + sec->_cooked_size < pc)
./sim/mcore/interp.c: (unsigned long) s_bss->vma , (unsigned long) s_bss->_cooked_size);
./sim/mcore/interp.c: heap_ptr = (unsigned long) s_bss->vma + (unsigned long) s_bss->_cooked_size;
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list