Commit 54799e4596bf8af33fd4a8dee153be7011c06d8d

Authored by Scott Wood
Committed by Albert ARIBAUD
1 parent f4dc714aaa

arm64: Make checkarmreloc accept arm64 relocations

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Feng <fenghua@phytium.com.cn>

Showing 1 changed file with 9 additions and 5 deletions Side-by-side Diff

... ... @@ -744,12 +744,16 @@
744 744 $(MAKE) -C $@ all
745 745 endif # config.mk
746 746  
747   -# ARM relocations should all be R_ARM_RELATIVE.
  747 +# ARM relocations should all be R_ARM_RELATIVE (32-bit) or
  748 +# R_AARCH64_RELATIVE (64-bit).
748 749 checkarmreloc: $(obj)u-boot
749   - @if test "R_ARM_RELATIVE" != \
750   - "`$(CROSS_COMPILE)readelf -r $< | cut -d ' ' -f 4 | grep R_ARM | sort -u`"; \
751   - then echo "$< contains relocations other than \
752   - R_ARM_RELATIVE"; false; fi
  750 + @RELOC="`$(CROSS_COMPILE)readelf -r -W $< | cut -d ' ' -f 4 | \
  751 + grep R_A | sort -u`"; \
  752 + if test "$$RELOC" != "R_ARM_RELATIVE" -a \
  753 + "$$RELOC" != "R_AARCH64_RELATIVE"; then \
  754 + echo "$< contains unexpected relocations: $$RELOC"; \
  755 + false; \
  756 + fi
753 757  
754 758 $(VERSION_FILE):
755 759 @mkdir -p $(dir $(VERSION_FILE))