!arch/arm: Use r9 as the PIC base register.

ARM PIC has used r10 as the base register, but the tree has never been
consistent about it.  Toolchain.defs gives CONFIG_BUILD_PIC
-mpic-register=r9 and CONFIG_PIC -mpic-register=r10, twenty-five lines
apart, and arm_initialstate.c sets REG_R9 from inline assembly under one
and REG_PIC under the other, with a comment reading "Set the PIC base
register (probably R10)".  This settles it on r9 for all of PIC: NXFLAT,
ELF PIC and CONFIG_BUILD_PIC alike.

r9 is the right choice rather than an arbitrary one.  It is the AAPCS
platform register, the "static base", and it is what GCC itself picks
for -msingle-pic-base on an EABI target; r10 is the non-EABI default.

It also removes a combination that cannot build today.  Stack checking
adds -ffixed-r10 in armv7-m/Toolchain.defs and armv8-m/Toolchain.defs,
while CONFIG_PIC adds -mpic-register=r10, and GCC rejects the pair with
"unable to use 'r10' for PIC register".  The comment above REG_PIC has
always said the register "can be R9 if stack checking is enabled", but
the definition was unconditionally REG_R10, so it would have named the
wrong register even had the build succeeded.

The thunk generator moves with the firmware.  NXFLAT import stubs had
the register baked in as "add ip,ip,sl", so a module built for r9 would
load and then branch to a wild address on its first call out.  The stubs
now come from NXFLAT_PIC_REG in the in-tree tool, which is built only
when CONFIG_NXFLAT is set, following the
CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE precedent in tools/Unix.mk.

That leaves modules built before this change, and they are the reason
for the ABI marker.  The NXFLAT header cannot carry a version: h_magic
is written by ldnxflat, which is GPL, derived from elf2flt, and stays
out of this repository, so it can never be changed in step with the
loader.  The import table can, because both of its ends are in-tree --
mknxflat emits it and nxflat_bindimports() reads it -- and ldnxflat
passes it through untouched.  So every module now imports
__nxflat_abi_v2, the base firmware defines it, and a module that does
not import it is refused.

Making the marker a real exported symbol rather than a name the loader
special-cases is what keeps it out of the build system's way: a board's
symbol table picks it up exactly as it picks up printf, so mksymtab.sh
and its equivalents need no change.  It also gives the reverse direction
a diagnosis for free -- a module built against a newer ABI than its
firmware fails with "Exported symbol __nxflat_abi_v2 not found".

Most of the remaining churn is boards restating a default.  ARCHPICFLAGS
is a "?=" default so that a board only speaks up when it differs, and
twenty-six were assigning the value the default already had.  MKNXFLAT
gets the same treatment: thirteen boards named the same tool, and the
only thing that varies is ARM versus Thumb-2, which falls out of
CONFIG_ARM_THUMB.  LDNXFLAT gains a default too -- it stays an
out-of-tree PATH lookup, but naming it centrally fixes boards that never
assigned it, where it expanded to nothing and handed make a recipe
beginning "-e", whose leading dash make ate as "ignore errors".

The non-ARM boards carrying -mpic-register=r10 lose it: it is an
ARM-only option, reachable only through CPICFLAGS, which is only used to
build NXFLAT modules, and no non-ARM board enables NXFLAT.

Boards keep nothing about PIC flags any more.  ARCHPICFLAGS was set by
sixty-three of them and only ever fed CPICFLAGS, which is only used to
build NXFLAT modules; no board outside arch/arm enables NXFLAT, so every
non-ARM copy was setting a variable nothing read.  Those are removed
rather than moved somewhere more central, which would only make dead
text look load-bearing.  LDNXFLAT goes the same way as MKNXFLAT, for the
same reason: thirteen boards named the same tool that Toolchain.defs now
names once.

One of them was not merely redundant.  am67/t3-gem-o1 asked for
"-mpic-register=r10 -ffixed-r10", which GCC refuses outright with
"unable to use 'r10' for PIC register" -- the very combination the
filter-out machinery in Toolchain.defs exists to prevent.  It has
survived because that board does not build NXFLAT modules, so the flags
are never handed to a compiler.  Renaming the register would have
carried the fault forward unchanged, so the line goes.

Tested on lm3s6965-ek:qemu-nxflat under QEMU, configured and built with
no overrides.  The nxflat example runs the errno, hello and struct
modules with output identical to the same config built from master.
Built with the old out-of-tree thunk generator instead, the same
firmware refuses all three with ENOEXEC rather than locking up in a
HardFault, which is what this change is for.  mps3-an547:picostest,
which is CONFIG_PIC without CONFIG_NXFLAT, builds clean and does not
build the thunk generator.

The .def files pick up two cosmetic changes here alongside the register:
a "Dyanamic" typo that codespell rejects, and a reworded comment in each
thunk_*.c.  Neither appears in the emitted thunk -- both are in C
comments -- so the generated text is still what the upstream tool
produces, modulo the register itself.

BREAKING CHANGE: ARM PIC moves from r10 to r9.  An NXFLAT module built
before this change has r10 baked into its import stubs and will not run
against a firmware carrying it; the two cannot be mixed.  The module is
refused with ENOEXEC rather than branching to a wild address, by way of the
__nxflat_abi_v2 marker described below.

Quick fix: rebuild the module against this tree.  Its source needs no
change.  A board that reserved r10 by hand, or that assigned ARCHPICFLAGS
or MKNXFLAT to restate a default, should drop those assignments; nothing
else is affected, and CONFIG_PIC without CONFIG_NXFLAT needs no action.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
This commit is contained in:
Marco Casaroli
2026-08-06 01:38:23 +08:00
committed by Xiang Xiao
parent 153592dc66
commit abbe0df26d
131 changed files with 269 additions and 249 deletions
@@ -160,14 +160,14 @@ indeed, a solution to the above NXFLAT problem in newer
compilers. You simply need to modify the board Make.defs
file like:
1. ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
1. ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r9
.. code-block:: bash
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 -mno-pic-data-is-text-relative
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r9 -mno-pic-data-is-text-relative
NOTE the minor difference from the post: NuttX uses ``r10`` as
the PIC base register by default in all configurations.
NuttX uses ``r9`` as the PIC base register in all configurations,
which matches the register named in the post above.
See this `thread <https://groups.google.com/forum/>`_ for additional information.
+12 -12
View File
@@ -290,7 +290,7 @@ CFLAGS must be provided. First, the option ``-fpic`` is required to tell
the compiler to generate position independent code (other GCC options,
like ``-fno-jump-tables`` might also be desirable). For ARM compilers,
two additional compilation options are required: ``-msingle-pic-base``
and ``-mpic-register=r10``. On ARM these are supplied centrally rather
and ``-mpic-register=r9``. On ARM these are supplied centrally rather
than per board; see `Where the ARM PIC flags come from`_ below.
**Target 2**. Given the ``hello.r1`` relocatable object, this target
@@ -338,25 +338,25 @@ On ARM the compilation flags described under **Target 1** are supplied by
``arch/arm/src/common/Toolchain.defs``, not by each board. A board only has
to say something when it differs from the default::
ARCHPICFLAGS ?= -fpic -msingle-pic-base -mpic-register=r10
ARCHPICFLAGS ?= -fpic -msingle-pic-base -mpic-register=r9
CPICFLAGS = $(ARCHPICFLAGS) $(filter-out --fixed-r10,$(CFLAGS))
CXXPICFLAGS = $(ARCHPICFLAGS) $(filter-out --fixed-r10,$(CXXFLAGS))
CPICFLAGS = $(ARCHPICFLAGS) $(filter-out --fixed-r9,$(CFLAGS))
CXXPICFLAGS = $(ARCHPICFLAGS) $(filter-out --fixed-r9,$(CXXFLAGS))
``ARCHPICFLAGS`` uses ``?=``, and the two derived variables use deferred
``=``, so a board that includes this file may still override
``ARCHPICFLAGS`` afterwards or append to it, and ``CFLAGS`` is whatever the
board finally set it to. A few boards do differ: one adds ``-ffixed-r10``
board finally set it to. A few boards do differ: one adds ``-ffixed-r9``
and one conditionally adds ``-mno-pic-data-is-text-relative``.
Reserving r10 in the base firmware
----------------------------------
Reserving r9 in the base firmware
---------------------------------
A module reaches its data through r10, and the base firmware has to leave
A module reaches its data through r9, and the base firmware has to leave
that register alone -- otherwise a call *back* from the firmware into module
code arrives with the wrong data base. ``qsort()`` with a comparison
function inside the module is the usual way to meet this. Under
``CONFIG_PIC`` the firmware is therefore built with ``--fixed-r10``.
``CONFIG_PIC`` the firmware is therefore built with ``--fixed-r9``.
That flag goes into ``ARCHCFLAGS`` rather than ``CFLAGS``, because nearly
every board ``Make.defs`` includes ``Toolchain.defs`` and then assigns::
@@ -369,8 +369,8 @@ remote from the cause: everything builds, and only a callback into module
code misbehaves.
The two sides of that contract cannot both appear on one command line. A
module gets r10 through ``-mpic-register=r10``, and GCC rejects it alongside
``--fixed-r10`` with *"unable to use 'r10' for PIC register"*. Since
module gets r9 through ``-mpic-register=r9``, and GCC rejects it alongside
``--fixed-r9`` with *"unable to use 'r9' for PIC register"*. Since
``CPICFLAGS``, ``CXXPICFLAGS``, ``CELFFLAGS`` and ``CXXELFFLAGS`` all derive
from ``CFLAGS``, the flag is filtered back out where they are defined,
rather than in every board that builds modules.
@@ -429,7 +429,7 @@ contiguous (virtual) address space like::
.data
.bss
It assumes that the PIC base register (usually r10 for ARM) points to
It assumes that the PIC base register (r9 for ARM) points to
the base of ``.text`` so that any address in ``.text``, ``.got``,
``.data``, ``.bss`` can be found with an offset from the same base
address. But that is not the memory arrangement that we need in the XIP
@@ -641,7 +641,7 @@ Appendix : out-of-tree code
+
+ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
+
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r9
+
+CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
+CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
+6 -4
View File
@@ -43,12 +43,14 @@
#ifdef CONFIG_PIC
/* This identifies the register the is used by the processor as the PIC base
* register. It is usually r9 or r10
/* This identifies the register that is used by the processor as the PIC base
* register. r9 is the AAPCS platform register (the "static base"), which is
* also what GCC picks for -msingle-pic-base on an EABI target, so the whole
* of PIC uses it: NXFLAT, ELF PIC, and CONFIG_BUILD_PIC alike.
*/
#define PIC_REG r10
#define PIC_REG_STRING "r10"
#define PIC_REG r9
#define PIC_REG_STRING "r9"
/* Macros to get and set the PIC base register. picbase is assumed to be
* of type (void*) and that it will fit into a uint32_t. These must be
+3 -3
View File
@@ -96,11 +96,11 @@
#define REG_LR REG_R14
#define REG_PC REG_R15
/* The PIC register is usually R10. It can be R9 is stack checking is enabled
* or if the user changes it with -mpic-register on the GCC command line.
/* The PIC base register is R9, the AAPCS platform register. See PIC_REG
* in arch/arm/include/arch.h; every PIC binary format uses the same one.
*/
#define REG_PIC REG_R10
#define REG_PIC REG_R9
/****************************************************************************
* Public Types
+3 -3
View File
@@ -123,11 +123,11 @@
#define REG_LR REG_R14
#define REG_PC REG_R15
/* The PIC register is usually R10. It can be R9 is stack checking is enabled
* or if the user changes it with -mpic-register on the GCC command line.
/* The PIC base register is R9, the AAPCS platform register. See PIC_REG
* in arch/arm/include/arch.h; every PIC binary format uses the same one.
*/
#define REG_PIC REG_R10
#define REG_PIC REG_R9
/* CONTROL register */
+3 -3
View File
@@ -200,11 +200,11 @@
#define REG_LR REG_R14
#define REG_PC REG_R15
/* The PIC register is usually R10. It can be R9 is stack checking is enabled
* or if the user changes it with -mpic-register on the GCC command line.
/* The PIC base register is R9, the AAPCS platform register. See PIC_REG
* in arch/arm/include/arch.h; every PIC binary format uses the same one.
*/
#define REG_PIC REG_R10
#define REG_PIC REG_R9
/* Multiprocessor Affinity Register (MPIDR): CRn=c0, opc1=0, CRm=c0, opc2=5 */
+3 -3
View File
@@ -180,11 +180,11 @@
#define REG_LR REG_R14
#define REG_PC REG_R15
/* The PIC register is usually R10. It can be R9 is stack checking is enabled
* or if the user changes it with -mpic-register on the GCC command line.
/* The PIC base register is R9, the AAPCS platform register. See PIC_REG
* in arch/arm/include/arch.h; every PIC binary format uses the same one.
*/
#define REG_PIC REG_R10
#define REG_PIC REG_R9
/* CONTROL register */
+3 -3
View File
@@ -200,11 +200,11 @@
#define REG_LR REG_R14
#define REG_PC REG_R15
/* The PIC register is usually R10. It can be R9 is stack checking is enabled
* or if the user changes it with -mpic-register on the GCC command line.
/* The PIC base register is R9, the AAPCS platform register. See PIC_REG
* in arch/arm/include/arch.h; every PIC binary format uses the same one.
*/
#define REG_PIC REG_R10
#define REG_PIC REG_R9
/* Multiprocessor Affinity Register (MPIDR): CRn=c0, opc1=0, CRm=c0, opc2=5 */
+3 -3
View File
@@ -186,11 +186,11 @@
#define REG_LR REG_R14
#define REG_PC REG_R15
/* The PIC register is usually R10. It can be R9 is stack checking is enabled
* or if the user changes it with -mpic-register on the GCC command line.
/* The PIC base register is R9, the AAPCS platform register. See PIC_REG
* in arch/arm/include/arch.h; every PIC binary format uses the same one.
*/
#define REG_PIC REG_R10
#define REG_PIC REG_R9
/* CONTROL register */
+3 -3
View File
@@ -200,11 +200,11 @@
#define REG_LR REG_R14
#define REG_PC REG_R15
/* The PIC register is usually R10. It can be R9 is stack checking is enabled
* or if the user changes it with -mpic-register on the GCC command line.
/* The PIC base register is R9, the AAPCS platform register. See PIC_REG
* in arch/arm/include/arch.h; every PIC binary format uses the same one.
*/
#define REG_PIC REG_R10
#define REG_PIC REG_R9
/* Multiprocessor Affinity Register (MPIDR): CRn=c0, opc1=0, CRm=c0, opc2=5 */
+3 -3
View File
@@ -127,11 +127,11 @@
#define REG_LR REG_R14
#define REG_PC REG_R15
/* The PIC register is usually R10. It can be R9 is stack checking is enabled
* or if the user changes it with -mpic-register on the GCC command line.
/* The PIC base register is R9, the AAPCS platform register. See PIC_REG
* in arch/arm/include/arch.h; every PIC binary format uses the same one.
*/
#define REG_PIC REG_R10
#define REG_PIC REG_R9
/****************************************************************************
* Public Types
+2 -2
View File
@@ -108,8 +108,8 @@ void up_initial_state(struct tcb_s *tcb)
#ifdef CONFIG_PIC
if (tcb->dspace != NULL)
{
/* Set the PIC base register (probably R10) to the address of the
* alloacated D-Space region.
/* Set the PIC base register (R9) to the address of the allocated
* D-Space region.
*/
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
+2 -2
View File
@@ -119,8 +119,8 @@ void up_initial_state(struct tcb_s *tcb)
#ifdef CONFIG_PIC
if (tcb->dspace != NULL)
{
/* Set the PIC base register (probably R10) to the address of the
* alloacated D-Space region.
/* Set the PIC base register (R9) to the address of the allocated
* D-Space region.
*/
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
+2 -2
View File
@@ -115,8 +115,8 @@ void up_initial_state(struct tcb_s *tcb)
#ifdef CONFIG_PIC
if (tcb->dspace != NULL)
{
/* Set the PIC base register (probably R10) to the address of the
* alloacated D-Space region.
/* Set the PIC base register (R9) to the address of the allocated
* D-Space region.
*/
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
+2 -2
View File
@@ -126,8 +126,8 @@ void up_initial_state(struct tcb_s *tcb)
#ifdef CONFIG_PIC
if (tcb->dspace != NULL)
{
/* Set the PIC base register (probably R10) to the address of the
* alloacated D-Space region.
/* Set the PIC base register (R9) to the address of the allocated
* D-Space region.
*/
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
+2 -2
View File
@@ -108,8 +108,8 @@ void up_initial_state(struct tcb_s *tcb)
#ifdef CONFIG_PIC
if (tcb->dspace != NULL)
{
/* Set the PIC base register (probably R10) to the address of the
* alloacated D-Space region.
/* Set the PIC base register (R9) to the address of the allocated
* D-Space region.
*/
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
+2 -2
View File
@@ -137,8 +137,8 @@ void up_initial_state(struct tcb_s *tcb)
#ifdef CONFIG_PIC
if (tcb->dspace != NULL)
{
/* Set the PIC base register (probably R10) to the address of the
* alloacated D-Space region.
/* Set the PIC base register (R9) to the address of the allocated
* D-Space region.
*/
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
+2 -2
View File
@@ -108,8 +108,8 @@ void up_initial_state(struct tcb_s *tcb)
#ifdef CONFIG_PIC
if (tcb->dspace != NULL)
{
/* Set the PIC base register (probably R10) to the address of the
* alloacated D-Space region.
/* Set the PIC base register (R9) to the address of the allocated
* D-Space region.
*/
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
+6 -1
View File
@@ -27,7 +27,12 @@ nuttx_mod_compile_options(-fvisibility=hidden -mlong-calls)
nuttx_elf_compile_options_ifdef(CONFIG_UNWINDER_ARM -fno-unwind-tables
-fno-asynchronous-unwind-tables)
nuttx_elf_compile_options_ifdef(CONFIG_PIC --fixed-r10 -mpic-register=r10)
# An ELF module needs r9 as its PIC base, so it must not also have the register
# fixed: GCC rejects that pair with "unable to use 'r9' for PIC register". This
# mirrors CELFFLAGS in common/Toolchain.defs, which filters --fixed-r9 back out
# of the inherited CFLAGS for the same reason.
nuttx_elf_compile_options_ifdef(CONFIG_PIC -mpic-register=r9)
nuttx_elf_link_options_ifdef(
CONFIG_PIC --unresolved-symbols=ignore-in-object-files --emit-relocs)
+38 -17
View File
@@ -569,26 +569,47 @@ PICFLAGS = -fpic -fPIE -mno-pic-data-is-text-relative -msingle-pic-base
# Flags for building PIC modules (NXFLAT). These were repeated verbatim in
# every ARM board Make.defs; they live here so a board only has to say
# something when it differs, and so the interaction with --fixed-r10 below
# something when it differs, and so the interaction with --fixed-r9 below
# can be handled in one place instead of 260.
#
# A board that needs to differ can still assign ARCHPICFLAGS after including
# this file, which overrides the default, or append to it.
ARCHPICFLAGS ?= -fpic -msingle-pic-base -mpic-register=r10
ARCHPICFLAGS ?= -fpic -msingle-pic-base -mpic-register=r9
# --fixed-r10 reserves r10 across the base firmware so a callback into
# module code arrives with the module's data base intact. A module is the
# other side of that contract: it gets r10 via -mpic-register=r10, and GCC
# rejects a command line carrying both with "unable to use 'r10' for PIC
# register". Since these derive from CFLAGS, the flag has to come back out
# here.
# mknxflat generates a module's import thunks, and the instruction set it
# emits them in has to match the module. Supplied centrally for the same
# reason as ARCHPICFLAGS above: every board that builds NXFLAT modules was
# naming the same tool, and only the ARM/Thumb-2 choice actually varies.
# Boards using the ARM instruction set -- dm320, lpc31xx and moxart -- fall
# out of CONFIG_ARM_THUMB rather than having to say anything.
ifeq ($(CONFIG_NXFLAT),y)
ifeq ($(CONFIG_ARM_THUMB),y)
MKNXFLAT ?= $(TOPDIR)$(DELIM)tools$(DELIM)mknxflat$(HOSTEXEEXT) -a thumb2
else
MKNXFLAT ?= $(TOPDIR)$(DELIM)tools$(DELIM)mknxflat$(HOSTEXEEXT) -a arm
endif
# ldnxflat is still an out-of-tree tool, so this is a PATH lookup. It is
# named here only so that a board which never assigned it -- lm3s6965-ek
# is one -- does not expand it to nothing and hand make a recipe starting
# with '-e', whose leading dash make then eats as "ignore errors".
LDNXFLAT ?= ldnxflat
endif
# --fixed-r9 reserves r9 across the base firmware so a callback into module
# code arrives with the module's data base intact. A module is the other
# side of that contract: it gets r9 via -mpic-register=r9, and GCC rejects a
# command line carrying both with "unable to use 'r9' for PIC register".
# Since these derive from CFLAGS, the flag has to come back out here.
#
# Both are deferred assignments, so CFLAGS and CXXFLAGS are whatever the
# board finally set them to, even though this file is included first.
CPICFLAGS = $(ARCHPICFLAGS) $(filter-out --fixed-r10,$(CFLAGS))
CXXPICFLAGS = $(ARCHPICFLAGS) $(filter-out --fixed-r10,$(CXXFLAGS))
CPICFLAGS = $(ARCHPICFLAGS) $(filter-out --fixed-r9,$(CFLAGS))
CXXPICFLAGS = $(ARCHPICFLAGS) $(filter-out --fixed-r9,$(CXXFLAGS))
ifneq ($(CONFIG_BUILD_PIC),)
ARCHCFLAGS += $(PICFLAGS) -mpic-register=r9
@@ -603,22 +624,22 @@ LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld)
# ELF module definitions
# --fixed-r10 is filtered out for the same reason as in CPICFLAGS above:
# under CONFIG_PIC these gain -mpic-register=r10, which GCC will not
# --fixed-r9 is filtered out for the same reason as in CPICFLAGS above:
# under CONFIG_PIC these gain -mpic-register=r9, which GCC will not
# accept alongside it.
CELFFLAGS = $(filter-out --fixed-r10,$(CFLAGS)) -fvisibility=hidden \
CELFFLAGS = $(filter-out --fixed-r9,$(CFLAGS)) -fvisibility=hidden \
-mlong-calls # --target1-abs
CXXELFFLAGS = $(filter-out --fixed-r10,$(CXXFLAGS)) -fvisibility=hidden \
CXXELFFLAGS = $(filter-out --fixed-r9,$(CXXFLAGS)) -fvisibility=hidden \
-mlong-calls
ifeq ($(CONFIG_PIC),y)
# ARCHCFLAGS, not CFLAGS: board Make.defs reassign CFLAGS with ':='
# after including this file, which would discard the flag.
ARCHCFLAGS += --fixed-r10
CELFFLAGS += $(PICFLAGS) -mpic-register=r10
CXXELFFLAGS += $(PICFLAGS) -mpic-register=r10
ARCHCFLAGS += --fixed-r9
CELFFLAGS += $(PICFLAGS) -mpic-register=r9
CXXELFFLAGS += $(PICFLAGS) -mpic-register=r9
# Generate an executable elf, need to ignore undefined symbols
LDELFFLAGS += --unresolved-symbols=ignore-in-object-files --emit-relocs
+2 -2
View File
@@ -111,8 +111,8 @@ void up_initial_state(struct tcb_s *tcb)
#ifdef CONFIG_PIC
if (tcb->dspace != NULL)
{
/* Set the PIC base register (probably R10) to the address of the
* alloacated D-Space region.
/* Set the PIC base register (R9) to the address of the allocated
* D-Space region.
*/
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
+47
View File
@@ -29,6 +29,7 @@
#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <nxflat.h>
#include <errno.h>
@@ -60,6 +61,22 @@
# define nxflat_dumpbuffer(m,b,n)
#endif
/****************************************************************************
* Public Data
****************************************************************************/
/* The module ABI marker. Every module built by tools/nxflat/mknxflat
* imports this, and a board's exported symbol table picks it up the same
* way it picks up any other imported name, so nothing has to special-case
* it in the build. Its value is never used; only its presence matters.
*
* A module built against a newer ABI than the firmware therefore fails
* with "Exported symbol __nxflat_abi_vN not found", which names the
* problem, and a module built against an older one is caught below.
*/
void *NXFLAT_ABI_MARKER;
/****************************************************************************
* Private Functions
****************************************************************************/
@@ -384,6 +401,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
FAR char *symname;
uint32_t offset;
uint16_t nimports;
bool abi_ok = false;
#ifdef CONFIG_ARCH_ADDRENV
int ret;
#endif
@@ -461,6 +479,17 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
symname = (FAR char *)
(offset + loadinfo->ispace + sizeof(struct nxflat_hdr_s));
/* Note the ABI marker as it goes past. It resolves like any
* other import -- the base firmware defines it below -- so the
* only thing special about it is that its absence means the
* module was built before the ABI it names.
*/
if (strcmp(symname, NXFLAT_ABI_SYMBOL) == 0)
{
abi_ok = true;
}
/* Find the exported symbol value for this symbol name. */
symbol = symtab_findbyname(exports, symname, nexports);
@@ -484,6 +513,24 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
/* Dump the relocation import table */
/* A module that never declared the ABI was built by a toolchain older
* than the move of the PIC base register to r9. Its import thunks add
* r10, so it would load here and then branch to a wild address on its
* first call into the base firmware. Refuse it while there is still
* something useful to say about it.
*/
if (!abi_ok)
{
berr("ERROR: Module does not declare " NXFLAT_ABI_SYMBOL ": it was "
"built by a toolchain predating the r9 PIC base register. "
"Rebuild it.\n");
#ifdef CONFIG_ARCH_ADDRENV
nxflat_addrenv_restore(loadinfo);
#endif
return -ENOEXEC;
}
#ifdef CONFIG_NXFLAT_DUMPBUFFER
if (nimports > 0)
{
@@ -27,7 +27,6 @@ include $(TOPDIR)/arch/arm/src/armv7-r/Toolchain.defs
LDSCRIPT = sdram.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 -ffixed-r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -35,8 +35,6 @@ endif
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
ARCHCFLAGS += -mabi=aapcs
@@ -26,8 +26,6 @@ include $(TOPDIR)/arch/arm/src/arm/Toolchain.defs
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)sdram.ld
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
@@ -28,8 +28,6 @@ LDSCRIPT2 = kernel-space.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2)
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -28,8 +28,6 @@ LDSCRIPT2 = kernel-space.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2)
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -28,8 +28,6 @@ LDSCRIPT2 = kernel-space.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2)
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -28,8 +28,6 @@ LDSCRIPT2 = kernel-space.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2)
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
@@ -25,8 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -25,8 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -25,10 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
NXFLATLDSCRIPT = -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)binfmt$(DELIM)libnxflat$(DELIM)gnu-nxflat-gotoff.ld)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
@@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
@@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
@@ -26,8 +26,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -25,8 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -25,8 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -25,8 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -27,8 +27,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
NXFLATLDSCRIPT = -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)binfmt$(DELIM)libnxflat$(DELIM)gnu-nxflat-gotoff.ld)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -41,8 +41,6 @@ else
ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv5te -msoft-float
endif
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
-2
View File
@@ -34,8 +34,6 @@ CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
@@ -38,8 +38,6 @@ CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
@@ -38,8 +38,6 @@ CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
@@ -38,8 +38,6 @@ CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
@@ -28,8 +28,6 @@ LDSCRIPT2 = kernel-space.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2)
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -25,8 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -32,8 +32,6 @@ endif
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -36,8 +36,6 @@ endif
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
@@ -41,8 +41,6 @@ else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
endif
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)

Some files were not shown because too many files have changed in this diff Show More