On Sun, Aug 30, 2009 at 7:02 PM, H.J. Lu wrote: > On Sun, Aug 30, 2009 at 6:47 PM, Alan Modra wrote: >> On Sun, Aug 30, 2009 at 11:42:20AM -0700, H.J. Lu wrote: >>> What should happen case where >>> >>> 1. No -z page size command line option is given. >>> 2. Output target is ELF and whose page size is different from default target. >>> >>> Your checkin changes the output page size to the page size of the default >>> target. >> >> Yes, I treat "--oformat other_elf" just the same as "--oformat srec". >> I don't really have a strong opinion as to what should be done in >> this case. >> > > It can also happen with > > OUTPUT_FORMAT("elf32-i386") > OUTPUT_ARCH(i386) > > in linker script and all input files are elf32-i386. I won't expect > the page size > won't be 4KB. This is a regression. > Here is a patch to call bfd_emul_set_maxpagesize and bfd_emul_set_commonpagesize only if they. OK to install? Thanks. -- H.J. --- 2009-08-31 H.J. Lu * ld.h (ld_config_type): Add maxpagesize_set and commonpagesize_set. * ldemul.c (set_output_arch_default): Call bfd_emul_set_maxpagesize/bfd_emul_set_commonpagesize only if config.maxpagesize_set/config.commonpagesize_set is TRUE. * ldmain.c (main): Initialize config.maxpagesize_set and config.commonpagesize_set to FALSE. * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Set config.maxpagesize_set/config.commonpagesize_set to TRUE when config.maxpagesize/config.commonpagesize is set.