[RFC PATCH] Smarter aligning of data segment

Nick Clifton nickc@cambridge.redhat.com
Sat Feb 9 15:11:00 GMT 2002


Hi Jakub,

> 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
> 	* ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
> 	(exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
> 	* ldexp.c (exp_data_seg): New variable.
> 	(exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
> 	(fold_binary): Handle DATA_SEGMENT_ALIGN.
> 	(exp_fold_tree): Handle DATA_SEGMENT_END.
> 	Pass allocation_done when recursing instead of hardcoding
> 	lang_allocating_phase_enum.
> 	* ldexp.h (exp_data_seg): New.
> 	* ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
> 	(lang_size_sections): New.
> 	* ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
> 	* scripttempl/elf.sc: If COMMONPAGESIZE is defined or if MAXPAGESIZE
> 	is 4KB, use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.

Approved - please apply.  (Although you may want to consider H-P's
suggestions too).

Cheers
        Nick



More information about the Binutils mailing list