qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] a99856: Remove CONFIG_USE_FDPIC.


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a99856: Remove CONFIG_USE_FDPIC.
Date: Fri, 04 May 2018 02:12:28 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a99856cd7f30b8c64cfaf97791dc5d462dabad6e
      
https://github.com/qemu/qemu/commit/a99856cd7f30b8c64cfaf97791dc5d462dabad6e
  Author: Christophe Lyon <address@hidden>
  Date:   2018-05-03 (Thu, 03 May 2018)

  Changed paths:
    M linux-user/elfload.c
    M linux-user/qemu.h

  Log Message:
  -----------
  Remove CONFIG_USE_FDPIC.

We want to avoid code disabled by default, because it ends up less
tested. This patch removes all instances of #ifdef CONFIG_USE_FDPIC,
most of which can be safely kept. For the ones that should be
conditionally executed, we define elf_is_fdpic(). Without this patch,
defining CONFIG_USE_FDPIC would prevent QEMU from building precisely
because elf_is_fdpic is not defined.

Signed-off-by: Christophe Lyon <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: cf58affecc67e1b22bdbd3dc90e19ad2d4b1ce3d
      
https://github.com/qemu/qemu/commit/cf58affecc67e1b22bdbd3dc90e19ad2d4b1ce3d
  Author: Christophe Lyon <address@hidden>
  Date:   2018-05-03 (Thu, 03 May 2018)

  Changed paths:
    M include/elf.h
    M linux-user/elfload.c

  Log Message:
  -----------
  linux-user: ARM-FDPIC: Identify ARM FDPIC binaries

Define an ARM-specific version of elf_is_fdpic:
FDPIC ELF objects are identified with e_ident[EI_OSABI] ==
ELFOSABI_ARM_FDPIC.

Co-Authored-By: Mickaël Guêné <address@hidden>
Signed-off-by: Christophe Lyon <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 3cb10cfafd83b9d7b3867b7deae29b8da3b5fe39
      
https://github.com/qemu/qemu/commit/3cb10cfafd83b9d7b3867b7deae29b8da3b5fe39
  Author: Christophe Lyon <address@hidden>
  Date:   2018-05-03 (Thu, 03 May 2018)

  Changed paths:
    M linux-user/elfload.c
    M linux-user/qemu.h

  Log Message:
  -----------
  linux-user: ARM-FDPIC: Add support of FDPIC for ARM.

Add FDPIC info into image_info structure since interpreter info is on
stack and needs to be saved to be accessed later on.

Co-Authored-By:  Mickaël Guêné <address@hidden>
Signed-off-by: Christophe Lyon <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: e8fa72957419c11984608062c7dcb204a6003a06
      
https://github.com/qemu/qemu/commit/e8fa72957419c11984608062c7dcb204a6003a06
  Author: Christophe Lyon <address@hidden>
  Date:   2018-05-03 (Thu, 03 May 2018)

  Changed paths:
    M linux-user/arm/signal.c

  Log Message:
  -----------
  linux-user: ARM-FDPIC: Add support for signals for FDPIC targets

The FDPIC restorer needs to deal with a function descriptor, hence we
have to extend 'retcode' such that it can hold the instructions needed
to perform this.

The restorer sequence uses the same thumbness as the exception
handler (mainly to support Thumb-only architectures).

Co-Authored-By: Mickaël Guêné <address@hidden>
Signed-off-by: Christophe Lyon <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
[lv: moved the change to linux-user/arm/signal.c]
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 465e237bf7cb6a9d8f9f137508125a14efcce1d6
      
https://github.com/qemu/qemu/commit/465e237bf7cb6a9d8f9f137508125a14efcce1d6
  Author: Laurent Vivier <address@hidden>
  Date:   2018-05-03 (Thu, 03 May 2018)

  Changed paths:
    M linux-user/aarch64/signal.c
    M linux-user/alpha/signal.c
    M linux-user/arm/signal.c
    M linux-user/hppa/signal.c
    M linux-user/i386/signal.c
    M linux-user/m68k/signal.c
    M linux-user/microblaze/signal.c
    M linux-user/mips/signal.c
    M linux-user/nios2/signal.c
    M linux-user/openrisc/signal.c
    M linux-user/ppc/signal.c
    M linux-user/riscv/signal.c
    M linux-user/s390x/signal.c
    M linux-user/sh4/signal.c
    M linux-user/signal-common.h
    M linux-user/signal.c
    M linux-user/sparc/signal.c
    M linux-user/tilegx/signal.c
    M linux-user/xtensa/signal.c

  Log Message:
  -----------
  linux-user: introduce target_sigsp() and target_save_altstack()

Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>


  Commit: 7f254c5cb80bc478794a4c3d7fe5d503b033be13
      
https://github.com/qemu/qemu/commit/7f254c5cb80bc478794a4c3d7fe5d503b033be13
  Author: Laurent Vivier <address@hidden>
  Date:   2018-05-03 (Thu, 03 May 2018)

  Changed paths:
    M include/exec/user/abitypes.h
    M linux-user/arm/target_structs.h
    M linux-user/syscall.c
    M linux-user/syscall_defs.h

  Log Message:
  -----------
  linux-user: remove useless padding in flock64 structure

Since commit 8efb2ed5ec ("linux-user: Correct signedness of
target_flock l_start and l_len fields"), flock64 structure uses
abi_llong for l_start and l_len in place of "unsigned long long"
this should force them to be aligned accordingly to the target
rules. So we can remove the padding field and the QEMU_PACKED
attribute.

I have compared the result of the following program before and
after the change:

    cat -> flock64_dump  <<EOF
    p/d sizeof(struct target_flock64)
    p/d &((struct target_flock64 *)0)->l_type
    p/d &((struct target_flock64 *)0)->l_whence
    p/d &((struct target_flock64 *)0)->l_start
    p/d &((struct target_flock64 *)0)->l_len
    p/d &((struct target_flock64 *)0)->l_pid
    quit
    EOF

    for file in build/all/*-linux-user/qemu-* ; do
    echo $file
    gdb -batch -nx -x flock64_dump $file 2> /dev/null
    done

The sizeof() changes because we remove the QEMU_PACKED.
The new size is 32 (except for i386 and m68k) and this is
the real size of "struct flock64" on the target architecture.

The following architectures differ:
aarch64_be, aarch64, alpha, armeb, arm, cris, hppa, nios2, or1k,
riscv32, riscv64, s390x.

For a subset of these architectures, I have checked with the following
program the new structure is the correct one:

  #include <stdio.h>
  #define __USE_LARGEFILE64
  #include <fcntl.h>

  int main(void)
  {
          printf("struct flock64 %d\n", sizeof(struct flock64));
          printf("l_type %d\n", &((struct flock64 *)0)->l_type);
          printf("l_whence %d\n", &((struct flock64 *)0)->l_whence);
          printf("l_start %d\n", &((struct flock64 *)0)->l_start);
          printf("l_len %d\n", &((struct flock64 *)0)->l_len);
          printf("l_pid %d\n", &((struct flock64 *)0)->l_pid);
  }

[I have checked aarch64, alpha, hppa, s390x]

For ARM, the target_flock64 becomes the EABI definition, so we need to
define the OABI one in place of the EABI one and use it when it is
needed.

I have also fixed the alignment value for sh4 (to align llong on 4 bytes)
(see c2e3dee6e0 "linux-user: Define target alignment size")
[We should check alignment properties for cris, nios2 and or1k]

Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>


  Commit: f0c889522255b8fee2fe3a6cc8157dfa80abac2a
      
https://github.com/qemu/qemu/commit/f0c889522255b8fee2fe3a6cc8157dfa80abac2a
  Author: Peter Maydell <address@hidden>
  Date:   2018-05-04 (Fri, 04 May 2018)

  Changed paths:
    M include/elf.h
    M include/exec/user/abitypes.h
    M linux-user/aarch64/signal.c
    M linux-user/alpha/signal.c
    M linux-user/arm/signal.c
    M linux-user/arm/target_structs.h
    M linux-user/elfload.c
    M linux-user/hppa/signal.c
    M linux-user/i386/signal.c
    M linux-user/m68k/signal.c
    M linux-user/microblaze/signal.c
    M linux-user/mips/signal.c
    M linux-user/nios2/signal.c
    M linux-user/openrisc/signal.c
    M linux-user/ppc/signal.c
    M linux-user/qemu.h
    M linux-user/riscv/signal.c
    M linux-user/s390x/signal.c
    M linux-user/sh4/signal.c
    M linux-user/signal-common.h
    M linux-user/signal.c
    M linux-user/sparc/signal.c
    M linux-user/syscall.c
    M linux-user/syscall_defs.h
    M linux-user/tilegx/signal.c
    M linux-user/xtensa/signal.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/vivier2/tags/linux-user-for-2.13-pull-request' into staging

# gpg: Signature made Thu 03 May 2018 22:38:35 BST
# gpg:                using RSA key F30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <address@hidden>"
# gpg:                 aka "Laurent Vivier <address@hidden>"
# gpg:                 aka "Laurent Vivier (Red Hat) <address@hidden>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-2.13-pull-request:
  linux-user: remove useless padding in flock64 structure
  linux-user: introduce target_sigsp() and target_save_altstack()
  linux-user: ARM-FDPIC: Add support for signals for FDPIC targets
  linux-user: ARM-FDPIC: Add support of FDPIC for ARM.
  linux-user: ARM-FDPIC: Identify ARM FDPIC binaries
  Remove CONFIG_USE_FDPIC.

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/e2f557f9889f...f0c889522255
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]