From: Christophe Lyon <christophe.lyon@st.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [ARM/FDPIC v5 00/21] FDPIC ABI for ARM
Date: Thu, 29 Aug 2019 16:29:00 -0000 [thread overview]
Message-ID: <47caaa2e-f392-31c1-d92b-b9681ece34a1@st.com> (raw)
In-Reply-To: <411229b9-7b7a-48d0-9a22-5b4095ea3714@st.com>
[-- Attachment #1: Type: text/plain, Size: 26220 bytes --]
On 29/08/2019 15:57, Christophe Lyon wrote:
> Hi,
>
> On 15/05/2019 14:39, Christophe Lyon wrote:
>> Hello,
>>
>> This patch series implements the GCC contribution of the FDPIC ABI for
>> ARM targets.
>>
>> This ABI enables to run Linux on ARM MMU-less cores and supports
>> shared libraries to reduce the memory footprint.
>>
>> Without MMU, text and data segments relative distances are different
>> from one process to another, hence the need for a dedicated FDPIC
>> register holding the start address of the data segment. One of the
>> side effects is that function pointers require two words to be
>> represented: the address of the code, and the data segment start
>> address. These two words are designated as "Function Descriptor",
>> hence the "FD PIC" name.
>>
>> On ARM, the FDPIC register is r9 [1], and the target name is
>> arm-uclinuxfdpiceabi. Note that arm-uclinux exists, but uses another
>> ABI and the BFLAT file format; it does not support code sharing.
>> The -mfdpic option is enabled by default, and -mno-fdpic should be
>> used to build the Linux kernel.
>>
>> This work was developed some time ago by STMicroelectronics, and was
>> presented during Linaro Connect SFO15 (September 2015). You can watch
>> the discussion and read the slides [2].
>> This presentation was related to the toolchain published on github [3],
>> which is based on binutils-2.22, gcc-4.7, uclibc-0.9.33.2, gdb-7.5.1
>> and qemu-2.3.0, and for which pre-built binaries are available [3].
>>
>> The ABI itself is described in details in [1].
>>
>> Our Linux kernel patches have been updated and committed by Nicolas
>> Pitre (Linaro) in July 2017. They are required so that the loader is
>> able to handle this new file type. Indeed, the ELF files are tagged
>> with ELFOSABI_ARM_FDPIC. This new tag has been allocated by ARM, as
>> well as the new relocations involved.
>>
>> The binutils, QEMU and uclibc-ng patch series have been merged a few
>> months ago. [4][5][6]
>>
>> This series provides support for architectures that support ARM and/or
>> Thumb-2 and has been tested on arm-linux-gnueabi without regression,
>> as well as arm-uclinuxfdpiceabi, using QEMU. arm-uclinuxfdpiceabi has
>> a few more failures than arm-linux-gnueabi, but is quite functional.
>>
>> I have also booted an STM32 board (stm32f469) which uses a cortex-m4
>> with linux-4.20.17 and ran successfully several tools.
>>
>> Are the GCC patches OK for inclusion in master?
>>
> I have addressed the comments I received on v5, and I am going to post updated versions of the patches that needed changes as follow-ups in this thread. I hope this will help reviewers as I will provide answers and updated patches next to their comments. After that, I will rebase the whole series and send it as v6 if that helps (several testsuite patches have already been approved as-is, but committing them now would change the patch numbering, thus possibly confusing reviewers).
>
> However, note that several patches in the series haven't received feedback yet, so this is a ping for them :-)
> [ARM/FDPIC v5 06/21] [ARM] FDPIC: Add support for c++ exceptions
> [ARM/FDPIC v5 10/21] [ARM] FDPIC: Implement TLS support.
> [ARM/FDPIC v5 11/21] [ARM] FDPIC: Add support to unwind FDPIC signal frame
> [ARM/FDPIC v5 12/21] [ARM] FDPIC: Restore r9 after we call __aeabi_read_tp
> [ARM/FDPIC v5 13/21] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture
>
I forgot to mention that I found a problem in libitm's sjlj.S, worth this additional patch.
Christophe
> Thanks,
>
> Christophe
>
>> Changes between v4 and v5:
>> - rebased on top of recent gcc-10 master (April 26th, 2019)
>> - fixed handling of stack-protector combined patterns in FDPIC mode
>>
>> Changes between v3 and v4:
>>
>> - improved documentation (patch 1)
>> - emit an error message (sorry) if the target architecture does not
>> Â Â support arm nor thumb-2 modes (patch 4)
>> - handle Richard's comments on patch 4 (comments, unspec)
>> - added .align directive (patch 5)
>> - fixed use of kernel helpers (__kernel_cmpxchg, __kernel_dmb) (patch 6)
>> - code factorization in patch 7
>> - typos/internal function name in patch 8
>> - improved patch 12
>> - dropped patch 16
>> - patch 20 introduces arm_arch*_thumb_ok effective targets to help
>> Â Â skip some tests
>> - I tested patch 2 on xtensa-buildroot-uclinux-uclibc, it adds many
>> Â Â new tests, but a few regressions
>> Â Â (https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00713.html)
>> - I compiled and executed several LTP tests to exercise pthreads and signals
>> - I wrote and executed a simple testcase to change the interaction
>> Â Â with __kernel_cmpxchg (ie. call the kernel helper rather than use an
>> Â Â implementation in libgcc as requested by Richard)
>>
>> Changes between v2 and v3:
>> - added doc entry for -mfdpic new option
>> - took Kyrill's comments into account (use "Armv7" instead of "7",
>> Â Â code factorization, use preprocessor instead of hard-coding "r9",
>> Â Â remove leftover code for thumb1 support, fixed comments)
>> - rebase over recent trunk
>> - patches with changes: 1, 2 (commit message), 3 (rebase), 4, 6, 7, 9,
>> Â Â 14 (rebase), 19 (rebase)
>>
>> Changes between v1 and v2:
>> - fix GNU coding style
>> - exit with an error for pre-Armv7
>> - use ACLE __ARM_ARCH and remove dead code for pre-Armv4
>> - remove unsupported attempts of pre-Armv7/thumb1 support
>> - add instructions in comments next to opcodes
>> - merge patches 11 and 13
>> - fixed protected visibility handling in patch 8
>> - merged legitimize_tls_address_fdpic and
>> Â Â legitimize_tls_address_not_fdpic as requested
>>
>> Thanks,
>>
>> Christophe.
>>
>>
>> [1] https://github.com/mickael-guene/fdpic_doc/blob/master/abi.txt
>> [2] http://connect.linaro.org/resource/sfo15/sfo15-406-arm-fdpic-toolset-kernel-libraries-for-cortex-m-cortex-r-mmuless-cores/
>> [3] https://github.com/mickael-guene/fdpic_manifest
>> [4] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=f1ac0afe481e83c9a33f247b81fa7de789edc4d9
>> [5] https://git.qemu.org/?p=qemu.git;a=commit;h=e8fa72957419c11984608062c7dcb204a6003a06
>> [6] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=13c46fbc1e5a021f2b9ed32d83aecc93ae5e655d
>>
>> Christophe Lyon (21):
>> Â Â [ARM] FDPIC: Add -mfdpic option support
>> Â Â [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts
>> Â Â [ARM] FDPIC: Force FDPIC related options unless -mno-fdpic is provided
>> Â Â [ARM] FDPIC: Add support for FDPIC for arm architecture
>> Â Â [ARM] FDPIC: Fix __do_global_dtors_aux and frame_dummy generation
>> Â Â [ARM] FDPIC: Add support for c++ exceptions
>> Â Â [ARM] FDPIC: Avoid saving/restoring r9 on stack since it is read-only
>> Â Â [ARM] FDPIC: Enforce local/global binding for function descriptors
>> Â Â [ARM] FDPIC: Add support for taking address of nested function
>> Â Â [ARM] FDPIC: Implement TLS support.
>> Â Â [ARM] FDPIC: Add support to unwind FDPIC signal frame
>> Â Â [ARM] FDPIC: Restore r9 after we call __aeabi_read_tp
>> Â Â [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture
>> Â Â [ARM][testsuite] FDPIC: Skip unsupported tests
>> Â Â [ARM][testsuite] FDPIC: Adjust scan-assembler patterns.
>> Â Â [ARM][testsuite] FDPIC: Skip tests that don't work in PIC mode
>> Â Â [ARM][testsuite] FDPIC: Handle *-*-uclinux*
>> Â Â [ARM][testsuite] FDPIC: Enable tests on pie_enabled targets
>> Â Â [ARM][testsuite] FDPIC: Adjust pr43698.c to avoid clash with uclibc.
>> Â Â [ARM][testsuite] FDPIC: Skip tests using architectures unsupported by
>> Â Â Â Â FDPIC
>> Â Â [ARM] FDPIC: Handle stack-protector combined patterns
>>
>> Â config/futex.m4Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â config/tls.m4Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>>  gcc/config.gcc                                    | 13 +-
>>  gcc/config/arm/arm-c.c                            |  2 +
>>  gcc/config/arm/arm-protos.h                       |  1 +
>>  gcc/config/arm/arm.c                              | 485 ++++++++++++++++++---
>>  gcc/config/arm/arm.h                              | 16 +-
>>  gcc/config/arm/arm.md                             | 151 ++++++-
>>  gcc/config/arm/arm.opt                            |  4 +
>>  gcc/config/arm/bpabi.h                            |  4 +-
>>  gcc/config/arm/linux-eabi.h                       |  7 +-
>>  gcc/config/arm/uclinuxfdpiceabi.h                 | 53 +++
>>  gcc/config/arm/unspecs.md                         |  1 +
>>  gcc/doc/invoke.texi                               | 20 +-
>>  gcc/ginclude/unwind-arm-common.h                  |  2 +-
>> Â gcc/testsuite/g++.dg/abi/forced.CÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/abi/guard2.CÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/cpp0x/noexcept03.CÂ Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ext/cleanup-10.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ext/cleanup-11.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ext/cleanup-8.CÂ Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ext/cleanup-9.CÂ Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ext/sync-4.CÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ipa/comdat.CÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ipa/devirt-c-7.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 3 +-
>> Â gcc/testsuite/g++.dg/ipa/ivinline-1.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ipa/ivinline-2.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ipa/ivinline-3.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ipa/ivinline-4.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ipa/ivinline-5.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ipa/ivinline-7.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ipa/ivinline-8.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/ipa/ivinline-9.CÂ Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>> Â gcc/testsuite/g++.dg/other/anon5.CÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 1 +
>> Â gcc/testsuite/g++.dg/tls/pr79288.CÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â 2 +-
>>  gcc/testsuite/gcc.c-torture/compile/pr82096.c     |  2 +-
>>  gcc/testsuite/gcc.dg/20020312-2.c                 |  1 +
>>  gcc/testsuite/gcc.dg/20041106-1.c                 |  2 +-
>>  gcc/testsuite/gcc.dg/addr_equal-1.c               |  3 +-
>>  gcc/testsuite/gcc.dg/cleanup-10.c                 |  2 +-
>>  gcc/testsuite/gcc.dg/cleanup-11.c                 |  2 +-
>>  gcc/testsuite/gcc.dg/cleanup-8.c                  |  2 +-
>>  gcc/testsuite/gcc.dg/cleanup-9.c                  |  2 +-
>>  gcc/testsuite/gcc.dg/const-1.c                    |  2 +-
>>  gcc/testsuite/gcc.dg/fdata-sections-1.c           |  2 +-
>>  gcc/testsuite/gcc.dg/fdata-sections-2.c           |  2 +-
>>  gcc/testsuite/gcc.dg/ipa/pure-const-1.c           |  2 +-
>>  gcc/testsuite/gcc.dg/noreturn-8.c                 |  2 +-
>>  gcc/testsuite/gcc.dg/pr33826.c                    |  3 +-
>>  gcc/testsuite/gcc.dg/pr39323-1.c                  |  2 +-
>>  gcc/testsuite/gcc.dg/pr39323-2.c                  |  2 +-
>>  gcc/testsuite/gcc.dg/pr39323-3.c                  |  2 +-
>>  gcc/testsuite/gcc.dg/pr65780-1.c                  |  2 +-
>>  gcc/testsuite/gcc.dg/pr65780-2.c                  |  2 +-
>>  gcc/testsuite/gcc.dg/pr67338.c                    |  2 +-
>>  gcc/testsuite/gcc.dg/pr78185.c                    |  2 +-
>>  gcc/testsuite/gcc.dg/pr83100-1.c                  |  2 +-
>>  gcc/testsuite/gcc.dg/pr83100-4.c                  |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-12g.c              |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-14g.c              |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-14gf.c             |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-16g.c              |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-17g.c              |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-18g.c              |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-1f.c               |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-22g.c              |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-2f.c               |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-31g.c              |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-33g.c              |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-4g.c               |  2 +-
>>  gcc/testsuite/gcc.dg/strlenopt-4gf.c              |  2 +-
>>  gcc/testsuite/gcc.dg/strncmp-2.c                  |  2 +-
>>  gcc/testsuite/gcc.dg/struct-ret-3.c               |  2 +-
>>  gcc/testsuite/gcc.dg/torture/ipa-pta-1.c          |  2 +-
>>  gcc/testsuite/gcc.dg/torture/pr69760.c            |  2 +-
>>  gcc/testsuite/gcc.dg/tree-ssa/alias-2.c           |  2 +-
>>  gcc/testsuite/gcc.dg/tree-ssa/ipa-split-5.c       |  2 +-
>>  gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c          |  2 +-
>>  gcc/testsuite/gcc.target/arm/20051215-1.c         |  1 +
>>  .../gcc.target/arm/armv6-unaligned-load-ice.c     |  1 +
>>  .../gcc.target/arm/attr-unaligned-load-ice.c      |  1 +
>>  gcc/testsuite/gcc.target/arm/attr_arm-err.c       |  1 +
>>  gcc/testsuite/gcc.target/arm/data-rel-2.c         |  1 +
>>  gcc/testsuite/gcc.target/arm/data-rel-3.c         |  1 +
>>  gcc/testsuite/gcc.target/arm/div64-unwinding.c    |  2 +-
>>  gcc/testsuite/gcc.target/arm/eliminate.c          |  2 +-
>>  gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c    |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c   |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c   |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c  |  1 +
>> Â gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c |Â Â 1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c    |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c  |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c   |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c  |  1 +
>> Â gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c |Â Â 1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c   |  1 +
>>  gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c |  1 +
>>  gcc/testsuite/gcc.target/arm/g2.c                 |  1 +
>>  gcc/testsuite/gcc.target/arm/interrupt-1.c        |  6 +-
>>  gcc/testsuite/gcc.target/arm/interrupt-2.c        |  6 +-
>>  gcc/testsuite/gcc.target/arm/ivopts-2.c           |  2 +-
>>  gcc/testsuite/gcc.target/arm/ivopts-3.c           |  2 +-
>>  gcc/testsuite/gcc.target/arm/ivopts-4.c           |  2 +-
>>  gcc/testsuite/gcc.target/arm/ivopts-5.c           |  2 +-
>>  gcc/testsuite/gcc.target/arm/macro_defs1.c        |  1 +
>>  gcc/testsuite/gcc.target/arm/mmx-1.c              |  1 +
>>  gcc/testsuite/gcc.target/arm/pr19599.c            |  1 +
>>  gcc/testsuite/gcc.target/arm/pr40887.c            |  1 +
>>  gcc/testsuite/gcc.target/arm/pr43597.c            |  2 +-
>>  gcc/testsuite/gcc.target/arm/pr43698.c            |  4 +-
>>  gcc/testsuite/gcc.target/arm/pr43920-2.c          |  2 +-
>>  gcc/testsuite/gcc.target/arm/pr45701-1.c          |  4 +-
>>  gcc/testsuite/gcc.target/arm/pr45701-2.c          |  4 +-
>>  gcc/testsuite/gcc.target/arm/pr59858.c            |  1 +
>>  gcc/testsuite/gcc.target/arm/pr61948.c            |  1 +
>>  gcc/testsuite/gcc.target/arm/pr65647-2.c          |  1 +
>>  gcc/testsuite/gcc.target/arm/pr66912.c            |  2 +-
>>  gcc/testsuite/gcc.target/arm/pr70830.c            |  3 +-
>>  gcc/testsuite/gcc.target/arm/pr77933-1.c          |  1 +
>>  gcc/testsuite/gcc.target/arm/pr77933-2.c          |  1 +
>>  gcc/testsuite/gcc.target/arm/pr79058.c            |  1 +
>>  gcc/testsuite/gcc.target/arm/pr83712.c            |  1 +
>>  .../gcc.target/arm/pragma_arch_switch_2.c         |  1 +
>>  gcc/testsuite/gcc.target/arm/scd42-1.c            |  1 +
>>  gcc/testsuite/gcc.target/arm/scd42-2.c            |  1 +
>>  gcc/testsuite/gcc.target/arm/scd42-3.c            |  1 +
>>  gcc/testsuite/gcc.target/arm/sibcall-1.c          |  1 +
>>  gcc/testsuite/gcc.target/arm/stack-checking.c     |  2 +-
>>  gcc/testsuite/gcc.target/arm/stack-red-zone.c     |  2 +-
>>  gcc/testsuite/gcc.target/arm/synchronize.c        |  2 +-
>>  gcc/testsuite/gcc.target/arm/tail-long-call.c     |  1 +
>>  gcc/testsuite/gcc.target/arm/tlscall.c            |  1 +
>>  gcc/testsuite/gcc.target/arm/vfp-longcall-apcs.c  |  1 +
>>  gcc/testsuite/lib/target-supports.exp             | 10 +
>>  libatomic/configure                               |  8 +-
>>  libatomic/configure.tgt                           |  2 +-
>>  libgcc/config.host                                |  4 +-
>>  libgcc/config/arm/linux-atomic.c                  | 55 ++-
>>  libgcc/config/arm/unwind-arm.c                    |  5 +
>>  libgcc/config/arm/unwind-arm.h                    | 31 +-
>>  libgcc/crtstuff.c                                 | 18 +
>>  libgcc/unwind-arm-common.inc                      | 216 +++++++++
>>  libgcc/unwind-pe.h                                | 17 +
>>  libitm/configure                                  | 20 +-
>>  libitm/configure.tgt                              |  2 +-
>>  libsanitizer/configure.tgt                        |  3 +
>> Â libstdc++-v3/acinclude.m4Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |Â 12 +-
>>  libstdc++-v3/configure                            | 36 +-
>>  libstdc++-v3/configure.host                       |  6 +-
>>  libstdc++-v3/libsupc++/eh_personality.cc          | 10 +-
>> Â libtool.m4Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |Â 14 +-
>> Â 156 files changed, 1233 insertions(+), 219 deletions(-)
>> Â create mode 100644 gcc/config/arm/uclinuxfdpiceabi.h
>>
>
[-- Attachment #2: 0023-ARM-FDPIC-Implement-libitm-support.patch --]
[-- Type: text/x-patch, Size: 1050 bytes --]
From 5da6c409d616a30dddd56aa6512eb79db1acb8fe Mon Sep 17 00:00:00 2001
From: Christophe Lyon <christophe.lyon@linaro.org>
Date: Thu, 29 Aug 2019 13:14:04 +0000
Subject: [ARM/FDPIC v6 23/24] [ARM] FDPIC: Implement libitm support.
The ldaddr macro in sjlj.S needs to be updated to support the FDPIC
model.
2019-XX-XX Christophe Lyon <christophe.lyon@st.com>
libitm/
* config/arm/sjlj.S (ldaddr): Add FDPIC support.
Change-Id: Ieb2c6613363341d109c3500af0575b133b17407d
diff --git a/libitm/config/arm/sjlj.S b/libitm/config/arm/sjlj.S
index a9abf16..5d44964 100644
--- a/libitm/config/arm/sjlj.S
+++ b/libitm/config/arm/sjlj.S
@@ -49,7 +49,16 @@
.arch armv7-m
#endif
-#if defined(HAVE_MOVT) && defined(PIC)
+#if defined(__FDPIC__)
+.macro ldaddr reg, addr
+ ldr \reg, 99f
+ add \reg, \reg, r9
+.subsection 1
+ .align 2
+99: .word \addr(GOTOFF)
+.subsection 0
+.endm
+#elif defined(HAVE_MOVT) && defined(PIC)
.macro ldaddr reg, addr
movw \reg, #:lower16:(\addr - (98f + PC_OFS))
movt \reg, #:upper16:(\addr - (98f + PC_OFS))
--
2.6.3
prev parent reply other threads:[~2019-08-29 15:40 UTC|newest]
Thread overview: 109+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 12:40 Christophe Lyon
2019-05-15 12:40 ` [ARM/FDPIC v5 01/21] [ARM] FDPIC: Add -mfdpic option support Christophe Lyon
2019-07-16 10:18 ` Richard Sandiford
2019-08-29 15:08 ` Christophe Lyon
2019-08-30 10:06 ` Richard Sandiford
2019-05-15 12:41 ` [ARM/FDPIC v5 03/21] [ARM] FDPIC: Force FDPIC related options unless -mno-fdpic is provided Christophe Lyon
2019-05-15 13:55 ` Szabolcs Nagy
2019-05-15 14:37 ` Rich Felker
2019-05-15 15:12 ` Christophe Lyon
2019-05-15 15:37 ` Rich Felker
2019-05-15 15:59 ` Szabolcs Nagy
2019-05-15 16:07 ` Rich Felker
2019-05-21 15:29 ` Christophe Lyon
2019-05-21 15:48 ` Rich Felker
2019-05-22 8:39 ` Szabolcs Nagy
2019-05-22 8:45 ` Christophe Lyon
2019-05-23 12:45 ` Christophe Lyon
2019-07-16 10:38 ` Richard Sandiford
2019-07-16 20:00 ` Rich Felker
2019-08-01 10:13 ` Christophe Lyon
2019-08-06 14:28 ` Richard Sandiford
2019-08-29 15:14 ` Christophe Lyon
2019-08-30 9:40 ` Richard Sandiford
2019-05-15 12:41 ` [ARM/FDPIC v5 04/21] [ARM] FDPIC: Add support for FDPIC for arm architecture Christophe Lyon
2019-07-16 12:33 ` Richard Sandiford
2019-08-20 17:13 ` Christophe Lyon
2019-08-29 15:39 ` Christophe Lyon
2019-09-02 16:12 ` Richard Sandiford
2019-09-02 20:04 ` Christophe Lyon
2019-09-03 8:40 ` Richard Sandiford
2019-09-04 19:59 ` Christophe Lyon
2019-09-05 8:03 ` Richard Sandiford
2019-05-15 12:41 ` [ARM/FDPIC v5 05/21] [ARM] FDPIC: Fix __do_global_dtors_aux and frame_dummy generation Christophe Lyon
2019-07-12 6:49 ` Richard Sandiford
2019-07-12 14:25 ` Christophe Lyon
2019-08-29 15:39 ` Christophe Lyon
2019-08-30 8:41 ` Richard Sandiford
2019-05-15 12:41 ` [ARM/FDPIC v5 02/21] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts Christophe Lyon
2019-07-12 7:44 ` Richard Sandiford
2019-07-12 13:25 ` Christophe Lyon
2019-07-12 13:28 ` Richard Sandiford
2019-08-29 15:14 ` Christophe Lyon
2019-08-30 9:30 ` Richard Sandiford
2019-08-30 14:48 ` Christophe Lyon
2019-08-30 15:15 ` Richard Sandiford
2019-09-02 7:51 ` Christophe Lyon
2019-09-02 8:31 ` Richard Sandiford
2019-08-30 14:40 ` Jonathan Wakely
2019-05-15 12:42 ` [ARM/FDPIC v5 07/21] [ARM] FDPIC: Avoid saving/restoring r9 on stack since it is read-only Christophe Lyon
2019-07-16 10:42 ` Kyrill Tkachov
2019-05-15 12:42 ` [ARM/FDPIC v5 06/21] [ARM] FDPIC: Add support for c++ exceptions Christophe Lyon
2019-08-30 9:31 ` Kyrill Tkachov
2019-08-30 14:44 ` Jonathan Wakely
2019-05-15 12:43 ` [ARM/FDPIC v5 08/21] [ARM] FDPIC: Enforce local/global binding for function descriptors Christophe Lyon
2019-07-16 10:51 ` Kyrill Tkachov
2019-05-15 12:43 ` [ARM/FDPIC v5 09/21] [ARM] FDPIC: Add support for taking address of nested function Christophe Lyon
2019-07-16 11:53 ` Kyrill Tkachov
2019-07-16 13:31 ` Kyrill Tkachov
2019-07-31 14:48 ` Christophe Lyon
2019-08-29 15:40 ` Christophe Lyon
2019-08-30 8:54 ` Kyrill Tkachov
2019-05-15 12:43 ` [ARM/FDPIC v5 10/21] [ARM] FDPIC: Implement TLS support Christophe Lyon
2019-09-04 14:16 ` Kyrill Tkachov
2019-09-04 20:03 ` Christophe Lyon
2019-09-09 8:54 ` Christophe Lyon
2019-05-15 12:44 ` [ARM/FDPIC v5 13/21] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture Christophe Lyon
2019-08-29 15:37 ` Kyrill Tkachov
2019-09-05 8:30 ` Christophe Lyon
2019-09-05 8:32 ` Christophe Lyon
2019-09-05 20:56 ` Ian Lance Taylor
2019-09-05 9:03 ` Kyrill Tkachov
2019-09-09 8:58 ` Christophe Lyon
2019-05-15 12:44 ` [ARM/FDPIC v5 11/21] [ARM] FDPIC: Add support to unwind FDPIC signal frame Christophe Lyon
2019-09-04 14:19 ` Kyrill Tkachov
2019-05-15 12:44 ` [ARM/FDPIC v5 12/21] [ARM] FDPIC: Restore r9 after we call __aeabi_read_tp Christophe Lyon
2019-08-29 15:40 ` Christophe Lyon
2019-08-29 15:44 ` Kyrill Tkachov
2019-05-15 12:45 ` [ARM/FDPIC v5 16/21] [ARM][testsuite] FDPIC: Skip tests that don't work in PIC mode Christophe Lyon
2019-07-19 8:56 ` Kyrill Tkachov
2019-05-15 12:45 ` [ARM/FDPIC v5 14/21] [ARM][testsuite] FDPIC: Skip unsupported tests Christophe Lyon
2019-07-19 8:52 ` Kyrill Tkachov
2019-05-15 12:45 ` [ARM/FDPIC v5 15/21] [ARM][testsuite] FDPIC: Adjust scan-assembler patterns Christophe Lyon
2019-07-19 8:54 ` Kyrill Tkachov
2019-05-15 12:46 ` [ARM/FDPIC v5 18/21] [ARM][testsuite] FDPIC: Enable tests on pie_enabled targets Christophe Lyon
2019-07-19 8:59 ` Kyrill Tkachov
2019-07-22 19:50 ` Mike Stump
2019-05-15 12:46 ` [ARM/FDPIC v5 17/21] [ARM][testsuite] FDPIC: Handle *-*-uclinux* Christophe Lyon
2019-07-19 8:57 ` Kyrill Tkachov
2019-07-22 19:37 ` Mike Stump
2019-05-15 12:46 ` [ARM/FDPIC v5 19/21] [ARM][testsuite] FDPIC: Adjust pr43698.c to avoid clash with uclibc Christophe Lyon
2019-07-19 9:00 ` Kyrill Tkachov
2019-05-15 12:47 ` [ARM/FDPIC v5 20/21] [ARM][testsuite] FDPIC: Skip tests using architectures unsupported by FDPIC Christophe Lyon
2019-07-19 9:03 ` Kyrill Tkachov
2019-09-06 8:01 ` Christophe Lyon
2019-09-06 8:28 ` Kyrill Tkachov
2019-09-06 9:10 ` Christophe Lyon
2019-09-06 17:44 ` Christophe Lyon
2019-09-09 8:38 ` Christophe Lyon
2019-05-15 12:47 ` [ARM/FDPIC v5 21/21] [ARM] FDPIC: Handle stack-protector combined patterns Christophe Lyon
2019-07-19 9:40 ` Kyrill Tkachov
2019-05-23 12:46 ` [ARM/FDPIC v5 00/21] FDPIC ABI for ARM Christophe Lyon
2019-06-04 12:57 ` Christophe Lyon
2019-06-06 12:36 ` Christophe Lyon
2019-06-17 11:42 ` Christophe Lyon
2019-07-01 12:16 ` Christophe Lyon
2019-07-08 14:28 ` Christophe Lyon
2019-07-16 9:13 ` Christophe Lyon
2019-08-29 14:54 ` Christophe Lyon
2019-08-29 16:29 ` Christophe Lyon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47caaa2e-f392-31c1-d92b-b9681ece34a1@st.com \
--to=christophe.lyon@st.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).