Optimize ARM relocation
Get series with b4
b4 am 20130514221601.1b0e939e@lilithVersions newest first
- v1 Latest0 of 5 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 5 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/5] Optimize ARM relocation
Quoted 25 lines · Albert ARIBAUD
*** NOTE: this series applies over the 'Factorize ARM
relocate_codeinstances' series.This series optimizes relocation by ensuring ARM binaries only use one type of relocation record,
R_ARM_RELATIVE., then optimizing relocation code accordingly.The only known case where relocation records other than
R_ARM_RELATIVEare generated is when a reference is made to a symbol defined in the linker script, e.g.__image_copy_start,__image_copy_end,__rel_dyn_start,__rel_dyn_end, and__dynsym_start.Moving the definition of these symbols from the linker scripts into a C module causes their references' types to become
R_ARM_RELATIVE.First,
arch/arm/lib/bss.cis replaced by a more genericarch/arm/lib/sections.cwhere all section symbols will be defined.Second,
__image_copy_startand__image_copy_endsymbols are moved from linker scripts toarch/arm/lib/sections.c
Quoted 7 lines
Third,
__rel_dyn_start,__rel_dyn_endand__synsym_startare moved from linker scripts intoarch/arm/lib/sections.cFourth, a check is added to the build system to ensure that ELF U-Boot binaries only use
R_ARM_RELATIVErecords.Last,
relocate_codeis optimized
Hmm, it seems I need to see my work posted on the list to discover how I could have done it better... I just noticed that if ARM binaries only have R_ARM_RELATIVE record types, then all the .dynsym sections can actually be dropped from the binaries. So, if I reorder the series and put patch 5/5 first, then I can eliminate patch 3/5, or more to the point, replace it with one which eliminates all dynsym stuff from linker scripts, further reducing code size. That'll go in V2...
Amicalement,
Signature · 1 line
Albert.