From: Nick Gasson <
nick....@arm.com>
The argument to -Ttext-segment should be a hex value but we are passing
the huge page size in decimal. This generates a "address of
`text-segment' isn't multiple of maximum page size" warning from ld.
Signed-off-by: Nick Gasson <
nick....@arm.com>
Reviewed-by: Steve Capper <
steve....@arm.com>
Signed-off-by: Steve Capper <
steve....@arm.com>
---
ld.hugetlbfs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ld.hugetlbfs b/ld.hugetlbfs
index 6ee8238..5e4e497 100755
--- a/ld.hugetlbfs
+++ b/ld.hugetlbfs
@@ -130,7 +130,9 @@ if [ "$HTLB_ALIGN" == "slice" ]; then
# targeting the ARM platform one needs to explicitly set the text segment offset
# otherwise it will be NULL.
case "$EMU" in
- armelf*_linux_eabi|aarch64elf*|aarch64linux*) HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" ;;
+ armelf*_linux_eabi|aarch64elf*|aarch64linux*)
+ printf -v TEXTADDR "%x" "$SLICE_SIZE"
+ HTLBOPTS="$HTLBOPTS -Ttext-segment=$TEXTADDR" ;;
elf_i386) HTLBOPTS="$HTLBOPTS -Ttext-segment=0x08000000" ;;
elf64ppc|elf64lppc)
if [ "$MMU_TYPE" == "Hash" ] ; then
--
2.20.1