16396:055d98aa2dd0 almost works but not quite. LDFLAGS_DIRECT means we end up with: gld -melf_i386 -nostdlib -N -Ttext 0x100000 -o hvmloader.tmp hvmloader.o mp_tables.o util.o smbios.o 32bitbios_support.o acpi/acpi.a Specifying a linker script and asking for -nostdlib is obviously contradictory. Removing $(LDFLAGS_DIRECT) fixes the problem. regards john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 12/11/07 22:06, "John Levon" <levon@movementarian.org> wrote:> 16396:055d98aa2dd0 almost works but not quite. LDFLAGS_DIRECT means we > end up with: > > gld -melf_i386 -nostdlib -N -Ttext 0x100000 -o hvmloader.tmp hvmloader.o > mp_tables.o util.o smbios.o 32bitbios_support.o acpi/acpi.a > > Specifying a linker script and asking for -nostdlib is obviously > contradictory. Removing $(LDFLAGS_DIRECT) fixes the problem.That command line doesn''t specify a linker script. And even if it did, how would that contradict -nostdlib? Also the -nostdlib is not in LDFLAGS_DIRECT: -melf_i386 is. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, Nov 13, 2007 at 05:00:03AM +0000, Keir Fraser wrote:> > gld -melf_i386 -nostdlib -N -Ttext 0x100000 -o hvmloader.tmp hvmloader.o > > mp_tables.o util.o smbios.o 32bitbios_support.o acpi/acpi.a > > > > Specifying a linker script and asking for -nostdlib is obviously > > contradictory. Removing $(LDFLAGS_DIRECT) fixes the problem. > > That command line doesn''t specify a linker script. And even if it did, how > would that contradict -nostdlib? Also the -nostdlib is not in > LDFLAGS_DIRECT: -melf_i386 is.-melf_i386 translates to using an internal script, specifically /usr/sfw/i386-pc-solaris2.11/lib/ldscripts/elf_i386.xc on Solaris. Clearly -nostdlib means it can''t be used, so it cannot find the relevant script and gives up: hatchback:~ $ gld -nostdlib -melf_i386 a.o gld: cannot open linker script file ldscripts/elf_i386.xc: No such file or directory Since the -nostdlib is presumably there for a reason, the correct fix seems to be to remove $(LDFLAGS_DIRECT), right? regards john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 13/11/07 17:32, "John Levon" <levon@movementarian.org> wrote:> On Tue, Nov 13, 2007 at 05:00:03AM +0000, Keir Fraser wrote: > > -melf_i386 translates to using an internal script, specifically > /usr/sfw/i386-pc-solaris2.11/lib/ldscripts/elf_i386.xc on > Solaris. Clearly -nostdlib means it can''t be used, so it cannot find the > relevant script and gives up: > > hatchback:~ $ gld -nostdlib -melf_i386 a.o > gld: cannot open linker script file ldscripts/elf_i386.xc: No such file or > directory > > Since the -nostdlib is presumably there for a reason, the correct fix > seems to be to remove $(LDFLAGS_DIRECT), right?Huh, okay. Well actually I think -nostdlib is overkill. I didn''t add it originally, and I hadn''t realised that all it does is kill some default library paths. Xen itself is linked without -nostdlib, for example. I''ll just kill uses of -nostdlib. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 13/11/07 17:47, "Keir Fraser" <Keir.Fraser@cl.cam.ac.uk> wrote:> On 13/11/07 17:32, "John Levon" <levon@movementarian.org> wrote: > >> On Tue, Nov 13, 2007 at 05:00:03AM +0000, Keir Fraser wrote: > > Huh, okay. Well actually I think -nostdlib is overkill. I didn''t add it > originally, and I hadn''t realised that all it does is kill some default > library paths. Xen itself is linked without -nostdlib, for example. > > I''ll just kill uses of -nostdlib.Oh, I see, it is needed when linking ''raw'' binaries with gcc, but not with gld. I expect it was on a few gcc command lines, and I didn''t remove it when we started changing over to use gld directly. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, Nov 13, 2007 at 06:04:47PM +0000, Keir Fraser wrote:> > On 13/11/07 17:32, "John Levon" <levon@movementarian.org> wrote: > > > >> On Tue, Nov 13, 2007 at 05:00:03AM +0000, Keir Fraser wrote: > > > > Huh, okay. Well actually I think -nostdlib is overkill. I didn''t add it > > originally, and I hadn''t realised that all it does is kill some default > > library paths. Xen itself is linked without -nostdlib, for example. > > > > I''ll just kill uses of -nostdlib. > > Oh, I see, it is needed when linking ''raw'' binaries with gcc, but not with > gld. I expect it was on a few gcc command lines, and I didn''t remove it when > we started changing over to use gld directly.Ah, makes sense. Thanks for the fix regards john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel