On 19 May 2013 10:51, in a thread relating to the sparc-linux-user linker script, Michael Tokarev <m...@tls.msk.ru> wrote: > If we apply this for 1.5, it will be the first release of debian > package without extra fixes. Hopefully anyway :) > > (Ofcourse we may add more fixes later but... ;)
Would it be reasonable to have QEMU's configure use sed or awk to start with ld's built-in linker script and transform it with the necessary modifications? Improved bsd-user support is in development in FreeBSD, and I'm trying to upstream the basic changes that are in the FreeBSD ports tree before others start submitting that work. One of these changes is a patch that replaces the x86_64.ld and i386.ld linker scripts with ones suitable for FreeBSD, but makes them unsuitable for Linux. I'd rather not end up just introducing a parallel set of ldscript files for FreeBSD, so would like to generate it from the default built-in one if possible. For the FreeBSD x86-64 case I can create a suitable linker script (at least, one identical to what's in the FreeBSD ports tree) with just the following: ld --verbose | sed \ -e '1,/==================================================/d' \ -e '/==================================================/,$d' \ -e 's/0x400000/0x60000000/g' That is, it just changes the start address. Is this generally the only difference between QEMU's linker scripts and system built-ins? (Perhaps we're missing other changes in FreeBSD, or platforms other than x86_64 have more extensive changes?)