[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA ver
From: |
Kevin O'Connor |
Subject: |
Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version |
Date: |
Wed, 27 Jan 2016 12:17:27 -0500 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Wed, Jan 27, 2016 at 05:57:28PM +0100, Marc Marí wrote:
> On Wed, 27 Jan 2016 16:43:29 +0000
> Stefan Hajnoczi <address@hidden> wrote:
>
> > On Tue, Jan 26, 2016 at 12:26:12PM +0100, Gerd Hoffmann wrote:
> > > On Di, 2016-01-26 at 12:20 +0100, Marc Marí wrote:
> > > > On Tue, 26 Jan 2016 11:11:54 +0000
> > > > Stefan Hajnoczi <address@hidden> wrote:
> > > >
> > > > > On Mon, Jan 25, 2016 at 02:17:48PM +0100, Marc Marí wrote:
> > > > > > +linuxboot_dma.img: linuxboot_dma.o
> > > > > > + $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m
> > > > > > elf_i386 -Ttext 0 -e _start -s -o $@ $<," Building
> > > > > > $(TARGET_DIR)$@") + %.img: %.o
> > > > > > $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -Ttext 0
> > > > > > -e _start -s -o $@ $<," Building $(TARGET_DIR)$@")
> > > > >
> > > > > Why is -m elf_i386 necessary for linuxboot_dma.img but not for
> > > > > the other *.img files?
> > > >
> > > > I cannot give a precise explanation. But if I don't force an
> > > > output type, I get this error:
> > > >
> > > > Building optionrom/linuxboot_dma.img
> > > > ld: i386 architecture of input file `linuxboot_dma.o' is
> > > > incompatible with i386:x86-64 output
> > >
> > > Any chance the linker needs -m32 too?
> >
> > I wonder why this isn't a problem for the existing firmware code. Are
> > we really building x86_64 ELF files for our firmware?
>
> Yes they are x86_64:
>
> pc-bios/optionrom/linuxboot.img: ELF 64-bit LSB executable, x86-64,
> version 1 (SYSV), statically linked, stripped
>
> But as they are written directly in assembly, it does not give any
> problem. Whereas when mixing C and ASM, it does give problems.
Would it hurt anything to add "-m elf_i386" to the generic assembler
rule and then use that for both targets? (Just to keep the makefile a
little simpler.)
-Kevin
- [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version, Marc Marí, 2016/01/25
- Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version, Stefan Hajnoczi, 2016/01/26
- Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version, Marc Marí, 2016/01/26
- Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version, Gerd Hoffmann, 2016/01/26
- Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version, Stefan Hajnoczi, 2016/01/27
- Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version, Marc Marí, 2016/01/27
- Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version,
Kevin O'Connor <=
- Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version, Marc Marí, 2016/01/28
- Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version, Stefan Hajnoczi, 2016/01/28
Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version, Kevin O'Connor, 2016/01/27