From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: ian@zembu.com (Ian Lance Taylor) Cc: binutils@sourceware.cygnus.com Subject: Re: Variable page size for ELF Date: Sat, 10 Jul 1999 20:47:00 -0000 Message-id: <19990711034758.0B58C57B9@ocean.lucon.org> References: <19990711024302.1424.qmail@daffy.airs.com> X-SW-Source: 1999-q3/msg00126.html > > Date: Sat, 10 Jul 1999 19:24:37 -0700 (PDT) > From: hjl@lucon.org (H.J. Lu) > > I got a request to support variable page size for ELF. It turned out > not too hard to implement. Is that interesting to anyone? Should I > send in my patch which adds "--page-size SIZE" to ld? > > It's hard for me to imagine an application for that. However, if > there is some reason that it is useful, in a way that can not be > handled by simply changing the linker script, then I have no objection The problem is get_elf_backend_data (abfd)->maxpagesize in BFD and MAXPAGESIZE in linker script. I did 1. Add functions to get/set get_elf_backend_data (abfd)->maxpagesize. 2. Made MAXPAGESIZE in linker script a variable. Now the ELF linker script has MAXPAGESIZE != 0 ? MAXPAGESIZE : ${MAXPAGESIZE} in place of ${MAXPAGESIZE}. > to such an option. At first glance it seems like anything you can do > by changing the page size you can do by changing the linker script, > using the PHDRS option. > How does PHDRS work? -- H.J. Lu (hjl@gnu.org)