[U-Boot] [PATCH v2 0/4] Get rid of R_ARM_ABS32 relocation records

Albert ARIBAUD albert.u.boot at aribaud.net
Mon Feb 25 11:58:56 CET 2013


R_ARM_ABS32 relocation records cause symbol references
to be zero before relocation, and become correct only
after relocation. On the other hand, R_ARM_RELATIVE
records make references correct before as well as
after relocation.

This patch series aims at removing all R_ARM_ABS32
relocations from ARM targets.

the main contributor of R_ARM_ABS32 relocations is the
support code for linker-lists, aka Linker-Generated
Arrays. This is due to the fact that LGA start and end
symbols, used for ranging these arrays, are linker-
generated symbols, which always relocate as R_ARM_ABS32
even though they are supposed *not* to be absolute.

V1 of this patch series fixed LGAs so that start or
end symbols are actually compiler-generated, and thus
their references are relocated using R_ARM_RELATIVE;
V2 also fixes crt0 so that BSS start and end references
do not produce R_ARM_ABS32 relocations either.

With V2, none of the targets built with MAKEALL -a arm
produces any R_ARM_ABS32 relocation.

This series has been build-tested with ARM (295 targets
clean) and powerpc (634 targets clean)

Changes in v2:
- fixed missing .sram memory mapping in OMAP lds
- removed useless linker script sections in SPL lds files
- made BSS start and end compiler-generated
- moved SPL linker script changes to their own commit
- added KEEP() to all linker files
- removed spurious change to common/command.c
- changed empty type from struct {} to char[0]
- dropped patch to removed board/micronas/vct/u-boot.lds
- removed all references to u-boot.lst

Albert ARIBAUD (4):
  arm: omap: map u_boot_lists section to .sram
  Remove linker lists (LGAs) from SPL linker scripts
  arm: make __bss_start and __bss_end__ compiler-generated
  Refactor linker-generated arrays

 .gitignore                                       |    1 -
 Makefile                                         |   13 +-
 arch/arm/cpu/arm920t/ep93xx/u-boot.lds           |    2 +-
 arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds        |    6 -
 arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds      |    6 -
 arch/arm/cpu/armv7/am33xx/u-boot-spl.lds         |   67 ++++++
 arch/arm/cpu/armv7/omap-common/u-boot-spl.lds    |    4 -
 arch/arm/cpu/ixp/u-boot.lds                      |   14 +-
 arch/arm/cpu/u-boot-spl.lds                      |   93 ++++++++
 arch/arm/cpu/u-boot.lds                          |   14 +-
 arch/arm/lib/Makefile                            |    1 +
 arch/arm/lib/bss.c                               |   39 ++++
 arch/avr32/cpu/u-boot.lds                        |    2 +-
 arch/blackfin/cpu/u-boot.lds                     |    2 +-
 arch/microblaze/cpu/u-boot.lds                   |    2 +-
 arch/mips/cpu/u-boot.lds                         |    2 +-
 arch/nds32/cpu/n1213/u-boot.lds                  |    2 +-
 arch/nios2/cpu/u-boot.lds                        |    2 +-
 arch/powerpc/cpu/74xx_7xx/u-boot.lds             |    2 +-
 arch/powerpc/cpu/mpc512x/u-boot.lds              |    2 +-
 arch/powerpc/cpu/mpc5xx/u-boot.lds               |    2 +-
 arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds |    2 +-
 arch/powerpc/cpu/mpc5xxx/u-boot.lds              |    2 +-
 arch/powerpc/cpu/mpc8220/u-boot.lds              |    2 +-
 arch/powerpc/cpu/mpc824x/u-boot.lds              |    2 +-
 arch/powerpc/cpu/mpc8260/u-boot.lds              |    2 +-
 arch/powerpc/cpu/mpc83xx/u-boot.lds              |    2 +-
 arch/powerpc/cpu/mpc85xx/u-boot-nand.lds         |    2 +-
 arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds     |    2 +-
 arch/powerpc/cpu/mpc85xx/u-boot.lds              |    2 +-
 arch/powerpc/cpu/mpc86xx/u-boot.lds              |    2 +-
 arch/powerpc/cpu/ppc4xx/u-boot.lds               |    2 +-
 arch/sandbox/cpu/u-boot.lds                      |    2 +-
 arch/sh/cpu/sh2/u-boot.lds                       |    2 +-
 arch/sh/cpu/sh3/u-boot.lds                       |    2 +-
 arch/sh/cpu/sh4/u-boot.lds                       |    2 +-
 arch/x86/cpu/u-boot.lds                          |    2 +-
 board/BuS/eb_cpu5282/u-boot.lds                  |    2 +-
 board/LEOX/elpt860/u-boot.lds                    |    2 +-
 board/RPXClassic/u-boot.lds                      |    2 +-
 board/RPXClassic/u-boot.lds.debug                |    2 +-
 board/RPXlite/u-boot.lds                         |    2 +-
 board/RPXlite/u-boot.lds.debug                   |    2 +-
 board/RPXlite_dw/u-boot.lds                      |    2 +-
 board/RPXlite_dw/u-boot.lds.debug                |    2 +-
 board/RRvision/u-boot.lds                        |    2 +-
 board/actux1/u-boot.lds                          |   24 ++-
 board/actux2/u-boot.lds                          |   24 ++-
 board/actux3/u-boot.lds                          |   18 +-
 board/adder/u-boot.lds                           |    2 +-
 board/ait/cam_enc_4xx/u-boot-spl.lds             |    4 -
 board/altera/nios2-generic/u-boot.lds            |    2 +-
 board/amcc/acadia/u-boot-nand.lds                |    2 +-
 board/amcc/bamboo/u-boot-nand.lds                |    2 +-
 board/amcc/canyonlands/u-boot-nand.lds           |    2 +-
 board/amcc/kilauea/u-boot-nand.lds               |    2 +-
 board/amcc/sequoia/u-boot-nand.lds               |    2 +-
 board/amcc/sequoia/u-boot-ram.lds                |    2 +-
 board/astro/mcf5373l/u-boot.lds                  |    2 +-
 board/cobra5272/u-boot.lds                       |    2 +-
 board/cogent/u-boot.lds                          |    2 +-
 board/cogent/u-boot.lds.debug                    |    2 +-
 board/cray/L1/u-boot.lds.debug                   |    2 +-
 board/dave/PPChameleonEVB/u-boot.lds             |    2 +-
 board/davinci/da8xxevm/u-boot-spl-da850evm.lds   |    5 -
 board/davinci/da8xxevm/u-boot-spl-hawk.lds       |    5 -
 board/dvlhost/u-boot.lds                         |   18 +-
 board/eltec/mhpc/u-boot.lds                      |    2 +-
 board/eltec/mhpc/u-boot.lds.debug                |    2 +-
 board/emk/top860/u-boot.lds                      |    2 +-
 board/ep88x/u-boot.lds                           |    2 +-
 board/esd/dasa_sim/u-boot.lds                    |    2 +-
 board/esd/pmc440/u-boot-nand.lds                 |    2 +-
 board/esd/tasreg/u-boot.lds                      |    2 +-
 board/esteem192e/u-boot.lds                      |    2 +-
 board/evb64260/u-boot.lds                        |    2 +-
 board/fads/u-boot.lds                            |    2 +-
 board/flagadm/u-boot.lds                         |    2 +-
 board/flagadm/u-boot.lds.debug                   |    2 +-
 board/freescale/m5208evbe/u-boot.lds             |    2 +-
 board/freescale/m52277evb/u-boot.lds             |    2 +-
 board/freescale/m5235evb/u-boot.lds              |    2 +-
 board/freescale/m5249evb/u-boot.lds              |    2 +-
 board/freescale/m5253demo/u-boot.lds             |    2 +-
 board/freescale/m5253evbe/u-boot.lds             |    2 +-
 board/freescale/m5271evb/u-boot.lds              |    2 +-
 board/freescale/m5272c3/u-boot.lds               |    2 +-
 board/freescale/m5275evb/u-boot.lds              |    2 +-
 board/freescale/m5282evb/u-boot.lds              |    2 +-
 board/freescale/m53017evb/u-boot.lds             |    2 +-
 board/freescale/m5329evb/u-boot.lds              |    2 +-
 board/freescale/m5373evb/u-boot.lds              |    2 +-
 board/freescale/m54418twr/u-boot.lds             |    2 +-
 board/freescale/m54451evb/u-boot.lds             |    2 +-
 board/freescale/m54455evb/u-boot.lds             |    2 +-
 board/freescale/m547xevb/u-boot.lds              |    2 +-
 board/freescale/m548xevb/u-boot.lds              |    2 +-
 board/freescale/mx31ads/u-boot.lds               |   16 +-
 board/gaisler/gr_cpci_ax2000/u-boot.lds          |    2 +-
 board/gaisler/gr_ep2s60/u-boot.lds               |    2 +-
 board/gaisler/gr_xc3s_1500/u-boot.lds            |    2 +-
 board/gaisler/grsim/u-boot.lds                   |    2 +-
 board/gaisler/grsim_leon2/u-boot.lds             |    2 +-
 board/gen860t/u-boot-flashenv.lds                |    2 +-
 board/gen860t/u-boot.lds                         |    2 +-
 board/genietv/u-boot.lds                         |    2 +-
 board/genietv/u-boot.lds.debug                   |    2 +-
 board/hermes/u-boot.lds                          |    2 +-
 board/hermes/u-boot.lds.debug                    |    2 +-
 board/hymod/u-boot.lds                           |    2 +-
 board/hymod/u-boot.lds.debug                     |    2 +-
 board/icu862/u-boot.lds                          |    2 +-
 board/icu862/u-boot.lds.debug                    |    2 +-
 board/idmr/u-boot.lds                            |    2 +-
 board/ip860/u-boot.lds                           |    2 +-
 board/ip860/u-boot.lds.debug                     |    2 +-
 board/ivm/u-boot.lds                             |    2 +-
 board/ivm/u-boot.lds.debug                       |    2 +-
 board/korat/u-boot-F7FC.lds                      |    2 +-
 board/kup/kup4k/u-boot.lds                       |    2 +-
 board/kup/kup4k/u-boot.lds.debug                 |    2 +-
 board/kup/kup4x/u-boot.lds                       |    2 +-
 board/kup/kup4x/u-boot.lds.debug                 |    2 +-
 board/lwmon/u-boot.lds                           |    2 +-
 board/lwmon/u-boot.lds.debug                     |    2 +-
 board/manroland/uc100/u-boot.lds                 |    2 +-
 board/matrix_vision/mvsmr/u-boot.lds             |    2 +-
 board/mbx8xx/u-boot.lds                          |    2 +-
 board/mbx8xx/u-boot.lds.debug                    |    2 +-
 board/mousse/u-boot.lds                          |    2 +-
 board/mpl/pip405/u-boot.lds.debug                |    2 +-
 board/mvblue/u-boot.lds                          |    2 +-
 board/netphone/u-boot.lds                        |    2 +-
 board/netphone/u-boot.lds.debug                  |    2 +-
 board/netta/u-boot.lds                           |    2 +-
 board/netta/u-boot.lds.debug                     |    2 +-
 board/netta2/u-boot.lds                          |    2 +-
 board/netta2/u-boot.lds.debug                    |    2 +-
 board/netvia/u-boot.lds                          |    2 +-
 board/netvia/u-boot.lds.debug                    |    2 +-
 board/nx823/u-boot.lds                           |    2 +-
 board/nx823/u-boot.lds.debug                     |    2 +-
 board/openrisc/openrisc-generic/u-boot.lds       |    2 +-
 board/quantum/u-boot.lds                         |    2 +-
 board/r360mpi/u-boot.lds                         |    2 +-
 board/rbc823/u-boot.lds                          |    2 +-
 board/renesas/sh7752evb/u-boot.lds               |    2 +-
 board/renesas/sh7757lcr/u-boot.lds               |    2 +-
 board/rsdproto/u-boot.lds                        |    2 +-
 board/samsung/smdk5250/smdk5250-uboot-spl.lds    |    2 +-
 board/samsung/smdk6400/u-boot-nand.lds           |    2 +-
 board/sandburst/karef/u-boot.lds.debug           |    2 +-
 board/sandburst/metrobox/u-boot.lds.debug        |    2 +-
 board/sandpoint/u-boot.lds                       |    2 +-
 board/sixnet/u-boot.lds                          |    2 +-
 board/snmc/qs850/u-boot.lds                      |    2 +-
 board/snmc/qs860t/u-boot.lds                     |    2 +-
 board/spc1920/u-boot.lds                         |    2 +-
 board/spd8xx/u-boot.lds                          |    2 +-
 board/spd8xx/u-boot.lds.debug                    |    2 +-
 board/stx/stxxtc/u-boot.lds                      |    2 +-
 board/stx/stxxtc/u-boot.lds.debug                |    2 +-
 board/svm_sc8xx/u-boot.lds                       |    2 +-
 board/tqc/tqm8xx/u-boot.lds                      |    2 +-
 board/v37/u-boot.lds                             |    2 +-
 board/vpac270/u-boot-spl.lds                     |    4 -
 board/w7o/u-boot.lds.debug                       |    2 +-
 board/xes/xpedite1000/u-boot.lds.debug           |    2 +-
 common/cmd_help.c                                |    2 +-
 config.mk                                        |    2 -
 doc/README.commands                              |   18 +-
 helper.mk                                        |   64 ------
 include/command.h                                |    2 +-
 include/configs/am335x_evm.h                     |    2 +-
 include/configs/pcm051.h                         |    2 +-
 include/env_callback.h                           |    2 +-
 include/linker_lists.h                           |  252 +++++++++++++++++-----
 nand_spl/board/freescale/mpc8536ds/Makefile      |    7 +-
 nand_spl/board/freescale/mpc8569mds/Makefile     |    7 +-
 nand_spl/board/freescale/mpc8572ds/Makefile      |    7 +-
 nand_spl/board/freescale/mx31pdk/Makefile        |    7 +-
 nand_spl/board/freescale/mx31pdk/u-boot.lds      |    2 +-
 nand_spl/board/freescale/p1010rdb/Makefile       |    7 +-
 nand_spl/board/freescale/p1023rds/Makefile       |    7 +-
 nand_spl/board/freescale/p1_p2_rdb/Makefile      |    7 +-
 nand_spl/board/karo/tx25/Makefile                |    7 +-
 nand_spl/board/karo/tx25/u-boot.lds              |    2 +-
 nand_spl/board/samsung/smdk6400/u-boot.lds       |    2 +-
 spl/.gitignore                                   |    1 -
 spl/Makefile                                     |    8 +-
 190 files changed, 665 insertions(+), 424 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
 create mode 100644 arch/arm/cpu/u-boot-spl.lds
 create mode 100644 arch/arm/lib/bss.c
 delete mode 100644 helper.mk

-- 
1.7.10.4



More information about the U-Boot mailing list