mbox series

[v2,0/4] Add support for FDPIC binaries on ARM

Message ID 20220802202142.1770838-1-Ben.Wolsieffer@hefring.com
Headers show
Series Add support for FDPIC binaries on ARM | expand

Message

Ben Wolsieffer Aug. 2, 2022, 8:21 p.m. UTC
Introduces support for the FDPIC binary format on ARM. FDPIC binaries
enable more efficient use of memory on no-MMU systems.

The first patch reverts the removal of general FDPIC support, while the
second adds support for FDPIC specifically on ARM. The last two patches
disable FDPIC when building Linux and U-Boot.

Changes in v2:
  * Simplify special casing of FDPIC toolchain target
  * Add additional patches to fix building Linux and U-Boot with an
    FDPIC toolchain by passing -mno-fdpic. I have submitted fixes
    upstream to do this automatically, but they have not yet been
    accepted and will take a while to end up in Buildroot.

Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle <arnout@mind.be>

Ben Wolsieffer (4):
  Revert "arch: drop now useless support for FDPIC"
  arch/arm: add support for FDPIC
  boot/uboot: pass -mno-fdpic if FDPIC is enabled
  linux: pass -mno-fdpic if FDPIC is enabled

 arch/Config.in           | 15 +++++++++++++++
 boot/uboot/uboot.mk      |  5 +++++
 linux/linux.mk           |  8 +++++++-
 package/Makefile.in      |  6 ++++++
 package/uclibc/uclibc.mk |  8 ++++++++
 5 files changed, 41 insertions(+), 1 deletion(-)

Comments

Thomas Petazzoni Aug. 2, 2022, 10:08 p.m. UTC | #1
Hello Ben,

On Tue,  2 Aug 2022 16:21:38 -0400
Ben Wolsieffer <ben.wolsieffer@hefring.com> wrote:

> Introduces support for the FDPIC binary format on ARM. FDPIC binaries
> enable more efficient use of memory on no-MMU systems.
> 
> The first patch reverts the removal of general FDPIC support, while the
> second adds support for FDPIC specifically on ARM. The last two patches
> disable FDPIC when building Linux and U-Boot.

Thanks a lot for this support! Could you comment on which
gcc/binutils/gdb versions have support for FDPIC on ARM?

Thomas
Ben Wolsieffer Aug. 3, 2022, 8:52 p.m. UTC | #2
Thanks for the review!

On Wed, Aug 03, 2022 at 12:08:43AM +0200, Thomas Petazzoni wrote:
> Hello Ben,
> 
> On Tue,  2 Aug 2022 16:21:38 -0400
> Ben Wolsieffer <ben.wolsieffer@hefring.com> wrote:
> 
> > Introduces support for the FDPIC binary format on ARM. FDPIC binaries
> > enable more efficient use of memory on no-MMU systems.
> > 
> > The first patch reverts the removal of general FDPIC support, while the
> > second adds support for FDPIC specifically on ARM. The last two patches
> > disable FDPIC when building Linux and U-Boot.
> 
> Thanks a lot for this support! Could you comment on which
> gcc/binutils/gdb versions have support for FDPIC on ARM?
 
Support was added in GCC 10 and binutils 2.31. It appears that the
patches to GDB [1] were never upstreamed, although mainline GDB seems to
work more or less fine without them. gdbserver and the kernel need
patches to support debugging on Cortex-M processors, but this is
unrelated to FDPIC.

[1] https://github.com/mickael-guene/gdb/commits/gdb-7.5.1-fdpic