All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] configure: Deal with OpenBSD/i386 emulation linker
@ 2017-11-06  0:53 Brad Smith
  2017-11-06 11:37 ` Peter Maydell
  0 siblings, 1 reply; 4+ messages in thread
From: Brad Smith @ 2017-11-06  0:53 UTC (permalink / raw)
  To: qemu-devel

OpenBSD/i386 uses elf_i386_obsd for the emulation linker.

Signed-off-by: Brad Smith <brad@comstyle.com>


diff --git a/configure b/configure
index dd73cce62f..02799d38ac 100755
--- a/configure
+++ b/configure
@@ -5159,9 +5159,9 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
         "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
         "$softmmu" = yes ; then
     # Different host OS linkers have different ideas about the name of the ELF
-    # emulation. Linux and OpenBSD use 'elf_i386'; FreeBSD uses the _fbsd
-    # variant; and Windows uses i386pe.
-    for emu in elf_i386 elf_i386_fbsd i386pe; do
+    # emulation. Linux uses 'elf_i386'; FreeBSD uses the _fbsd variant;
+    # OpenBSD uses the _obsd variant; and Windows uses i386pe.
+    for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do
         if "$ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
             ld_i386_emulation="$emu"
             roms="optionrom"

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] configure: Deal with OpenBSD/i386 emulation linker
  2017-11-06  0:53 [Qemu-devel] [PATCH] configure: Deal with OpenBSD/i386 emulation linker Brad Smith
@ 2017-11-06 11:37 ` Peter Maydell
  2017-11-07 23:51   ` Brad Smith
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2017-11-06 11:37 UTC (permalink / raw)
  To: Brad Smith; +Cc: QEMU Developers

On 6 November 2017 at 00:53, Brad Smith <brad@comstyle.com> wrote:
> OpenBSD/i386 uses elf_i386_obsd for the emulation linker.
>
> Signed-off-by: Brad Smith <brad@comstyle.com>
>
>
> diff --git a/configure b/configure
> index dd73cce62f..02799d38ac 100755
> --- a/configure
> +++ b/configure
> @@ -5159,9 +5159,9 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
>          "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
>          "$softmmu" = yes ; then
>      # Different host OS linkers have different ideas about the name of the ELF
> -    # emulation. Linux and OpenBSD use 'elf_i386'; FreeBSD uses the _fbsd
> -    # variant; and Windows uses i386pe.
> -    for emu in elf_i386 elf_i386_fbsd i386pe; do
> +    # emulation. Linux uses 'elf_i386'; FreeBSD uses the _fbsd variant;
> +    # OpenBSD uses the _obsd variant; and Windows uses i386pe.
> +    for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do
>          if "$ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
>              ld_i386_emulation="$emu"
>              roms="optionrom"

My OpenBSD/x86-64's ld supports both "elf_i386" and "elf_i386_obsd" --
which should we be using in this case? With your change we'll
still prefer elf_i386 if the linker handles both.

Do you know what the difference between the two is?

thanks
-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] configure: Deal with OpenBSD/i386 emulation linker
  2017-11-06 11:37 ` Peter Maydell
@ 2017-11-07 23:51   ` Brad Smith
  2017-11-09 11:03     ` Peter Maydell
  0 siblings, 1 reply; 4+ messages in thread
From: Brad Smith @ 2017-11-07 23:51 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers

On Mon, Nov 06, 2017 at 11:37:45AM +0000, Peter Maydell wrote:
> On 6 November 2017 at 00:53, Brad Smith <brad@comstyle.com> wrote:
> > OpenBSD/i386 uses elf_i386_obsd for the emulation linker.
> >
> > Signed-off-by: Brad Smith <brad@comstyle.com>
> >
> >
> > diff --git a/configure b/configure
> > index dd73cce62f..02799d38ac 100755
> > --- a/configure
> > +++ b/configure
> > @@ -5159,9 +5159,9 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
> >          "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
> >          "$softmmu" = yes ; then
> >      # Different host OS linkers have different ideas about the name of the ELF
> > -    # emulation. Linux and OpenBSD use 'elf_i386'; FreeBSD uses the _fbsd
> > -    # variant; and Windows uses i386pe.
> > -    for emu in elf_i386 elf_i386_fbsd i386pe; do
> > +    # emulation. Linux uses 'elf_i386'; FreeBSD uses the _fbsd variant;
> > +    # OpenBSD uses the _obsd variant; and Windows uses i386pe.
> > +    for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do
> >          if "$ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
> >              ld_i386_emulation="$emu"
> >              roms="optionrom"
> 
> My OpenBSD/x86-64's ld supports both "elf_i386" and "elf_i386_obsd" --
> which should we be using in this case? With your change we'll
> still prefer elf_i386 if the linker handles both.

I sent a second rev of the diff with slightly tweaked comment.

OpenBSD/amd64 uses elf_i386. OpenBSD/i386 uses elf_i386_obsd.

> Do you know what the difference between the two is?

No.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] configure: Deal with OpenBSD/i386 emulation linker
  2017-11-07 23:51   ` Brad Smith
@ 2017-11-09 11:03     ` Peter Maydell
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2017-11-09 11:03 UTC (permalink / raw)
  To: Brad Smith; +Cc: QEMU Developers

On 7 November 2017 at 23:51, Brad Smith <brad@comstyle.com> wrote:
> On Mon, Nov 06, 2017 at 11:37:45AM +0000, Peter Maydell wrote:
>> On 6 November 2017 at 00:53, Brad Smith <brad@comstyle.com> wrote:
>> > OpenBSD/i386 uses elf_i386_obsd for the emulation linker.
>> >
>> > Signed-off-by: Brad Smith <brad@comstyle.com>
>> >
>> >
>> > diff --git a/configure b/configure
>> > index dd73cce62f..02799d38ac 100755
>> > --- a/configure
>> > +++ b/configure
>> > @@ -5159,9 +5159,9 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
>> >          "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
>> >          "$softmmu" = yes ; then
>> >      # Different host OS linkers have different ideas about the name of the ELF
>> > -    # emulation. Linux and OpenBSD use 'elf_i386'; FreeBSD uses the _fbsd
>> > -    # variant; and Windows uses i386pe.
>> > -    for emu in elf_i386 elf_i386_fbsd i386pe; do
>> > +    # emulation. Linux uses 'elf_i386'; FreeBSD uses the _fbsd variant;
>> > +    # OpenBSD uses the _obsd variant; and Windows uses i386pe.
>> > +    for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do
>> >          if "$ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
>> >              ld_i386_emulation="$emu"
>> >              roms="optionrom"
>>
>> My OpenBSD/x86-64's ld supports both "elf_i386" and "elf_i386_obsd" --
>> which should we be using in this case? With your change we'll
>> still prefer elf_i386 if the linker handles both.
>
> I sent a second rev of the diff with slightly tweaked comment.
>
> OpenBSD/amd64 uses elf_i386. OpenBSD/i386 uses elf_i386_obsd.
>
>> Do you know what the difference between the two is?
>
> No.

...then how do we know that elf_i386 is the right one to use
for 32-bit linking when checking on an OpenBSD/amd64 system?

thanks
-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-09 11:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06  0:53 [Qemu-devel] [PATCH] configure: Deal with OpenBSD/i386 emulation linker Brad Smith
2017-11-06 11:37 ` Peter Maydell
2017-11-07 23:51   ` Brad Smith
2017-11-09 11:03     ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.