Skip to content

Optimize ARM relocation

Albert ARIBAUD u-boot 8 versions – New

Get series with b4
b4 am 20130621230737.5ad77c79@lilith

Versions newest first · linked by author and title

  1. v3 Latest posting 6/60 of 6 patches 0 repliesNew
  2. v3 posting 5/60 of 6 patches 1 replySuperseded
  3. v3 posting 4/60 of 6 patches 0 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v3 posting 3/60 of 6 patches0 repliesSuperseded
v3 posting 2/60 of 6 patches0 repliesSuperseded
v3 posting 1/66 patches0 repliesSuperseded
v26 patches0 repliesSuperseded
v10 of 5 patches0 repliesSuperseded

Patches in v3 posting 6/6 No applies recorded yet

None of the 6 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [U-Boot] [PATCH v3 0/6] Optimize ARM relocation
Quoted 59 lines · Albert ARIBAUD

This series optimizes relocation by ensuring ARM binaries only use one type of relocation record, R_ARM_RELATIVE., then optimizing relocation code accordingly.

1. A Makefile rule is added that checks that no other relocation record types are generated except R_ARM_RELATIVE; build fails if this is the case.

2. All references to dymsym are removed, as this table is not used for R_ARM_RELATIVE relocations.

3. arch/arm/lib/bss.c is replaced by a more generic arch/arm/lib/sections.c where all section symbols will be defined.

4. __image_copy_start and __image_copy_end symbols are moved from linker scripts to arch/arm/lib/sections.c

5. __rel_dyn_start and __rel_dyn_end are moved from linker scripts into arch/arm/lib/sections.c

6. relocate_code is optimized based on the fact that symbol references are now always valid even before relcation, and that only R_ARM_RELATIVE relocations will be met.

Changes in v3:
- fix commit message typo (of -> if)
- fix commit message typo (breaks -> break)

Changes in v2:
- use $< instead of $(obj)u-boot
- new in V2: remove all dynsym references
- various comment fixes

Albert ARIBAUD (6):
arm: ensure u-boot only uses relative relocations remove all references to .dynsym
arm: generalize lib/bss.c into lib/sections.c
arm: make __image_copy_{start,end} compiler-generated
arm: make __rel_dyn_{start,end} compiler-generated
arm: optimize relocate_code routine

 Makefile                                       |    7 +++
 arch/arm/config.mk                             |    5 ++
 arch/arm/cpu/arm920t/ep93xx/u-boot.lds         |    6 ++-
 arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds      |    5 --
 arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds    |    5 --
 arch/arm/cpu/ixp/u-boot.lds                    |   20 +++++---
 arch/arm/cpu/u-boot-spl.lds                    |    6 +--
 arch/arm/cpu/u-boot.lds                        |   21 +++++---
 arch/arm/lib/Makefile                          |    2 +-
 arch/arm/lib/relocate.S                        |   61 ++++++------------------
 arch/arm/lib/{bss.c => sections.c}             |    8 +++-
 board/actux1/u-boot.lds                        |   20 +++++---
 board/actux2/u-boot.lds                        |   20 +++++---
 board/actux3/u-boot.lds                        |   20 +++++---
 board/ait/cam_enc_4xx/u-boot-spl.lds           |    5 --
Quoted 9 lines
 board/davinci/da8xxevm/u-boot-spl-da850evm.lds |    5 --
 board/davinci/da8xxevm/u-boot-spl-hawk.lds     |    1 -
 board/dvlhost/u-boot.lds                       |   20 +++++---
 board/freescale/mx31ads/u-boot.lds             |   20 +++++---
 board/vpac270/u-boot-spl.lds                   |    6 +--
 include/asm-generic/sections.h                 |    3 --
 21 files changed, 139 insertions(+), 127 deletions(-)
 rename arch/arm/lib/{bss.c => sections.c} (79%)

Applied to u-boot-arm/master.

Amicalement,

Signature · 1 line
Albert.