diff --git a/test/unit/objs/ppc64le/mcount_loc-issue-1102.test b/test/unit/objs/ppc64le/mcount_loc-issue-1102.test index 082efe1a88ce..34dc218aaf1b 100755 --- a/test/unit/objs/ppc64le/mcount_loc-issue-1102.test +++ b/test/unit/objs/ppc64le/mcount_loc-issue-1102.test @@ -1,19 +1,14 @@ #!/bin/bash -# % objdump -j __mcount_loc -Dr mcount_loc-issue-1102.OUTPUT.o +# Verify an __mcount_loc relocation for netlbl_catmap_getlong: # -# mcount_loc-issue-1102.OUTPUT.o: file format elf64-powerpcle +# % readelf --wide --relocs mcount_loc-issue-1102.OUTPUT.o | \ +# awk '/\.rela__mcount_loc/' RS="\n\n" ORS="\n\n" # -# -# Disassembly of section __mcount_loc: -# -# 0000000000000000 <__mcount_loc>: -# ... -# 0: R_PPC64_ADDR64 netlbl_catmap_getlong+0x4 -# - -rela=$(objdump -j __mcount_loc -Dr mcount_loc-issue-1102.OUTPUT.o 2>/dev/null | \ - awk '$2=="R_PPC64_ADDR64" && $3=="netlbl_catmap_getlong+0x4" { print $3 }' 2>/dev/null) +# Relocation section '.rela__mcount_loc' at offset 0x14d0 contains 1 entry: +# Offset Info Type Symbol's Value Symbol's Name + Addend +# 0000000000000000 0000000200000026 R_PPC64_ADDR64 0000000000000000 netlbl_catmap_getlong + 4 -[[ $rela == "netlbl_catmap_getlong+0x4" ]] && exit 0 -exit 1 +readelf --wide --relocs mcount_loc-issue-1102.OUTPUT.o 2>/dev/null | \ + awk '/\.rela__mcount_loc/' RS="\n\n" ORS="\n\n" | \ + grep -q '\.*\ + 4$' diff --git a/test/unit/objs/x86_64/mcount_loc-issue-1102.test b/test/unit/objs/x86_64/mcount_loc-issue-1102.test index 1976367f8110..7d64d23cf76e 100755 --- a/test/unit/objs/x86_64/mcount_loc-issue-1102.test +++ b/test/unit/objs/x86_64/mcount_loc-issue-1102.test @@ -2,19 +2,13 @@ # Verify an __mcount_loc relocation for netlbl_catmap_getlong: # -# % objdump -j __mcount_loc -Dr mcount_loc-issue-1102.OUTPUT.o +# % readelf --wide --relocs mcount_loc-issue-1102.OUTPUT.o | \ +# awk '/\.rela__mcount_loc/' RS="\n\n" ORS="\n\n" # -# mcount_loc-issue-1102.OUTPUT.o: file format elf64-x86-64 -# -# -# Disassembly of section __mcount_loc: -# -# 0000000000000000 <__mcount_loc>: -# ... -# 0: R_X86_64_64 netlbl_catmap_getlong - -rela=$(objdump -j __mcount_loc -Dr mcount_loc-issue-1102.OUTPUT.o 2>/dev/null | \ - awk '$2=="R_X86_64_64" && $3=="netlbl_catmap_getlong" { print $3 }' 2>/dev/null) +# Relocation section '.rela__mcount_loc' at offset 0x840 contains 1 entry: +# Offset Info Type Symbol's Value Symbol's Name + Addend +# 0000000000000000 0000000200000001 R_X86_64_64 0000000000000000 netlbl_catmap_getlong + 0 -[[ $rela == "netlbl_catmap_getlong" ]] && exit 0 -exit 1 +readelf --wide --relocs mcount_loc-issue-1102.OUTPUT.o 2>/dev/null | \ + awk '/\.rela__mcount_loc/' RS="\n\n" ORS="\n\n" | \ + grep -q '\.*\ + 0$' diff --git a/test/unit/objs/x86_64/zero-page-rela-issue-1064.test b/test/unit/objs/x86_64/zero-page-rela-issue-1064.test index 2b4096cbbed2..81ecf14b2f01 100755 --- a/test/unit/objs/x86_64/zero-page-rela-issue-1064.test +++ b/test/unit/objs/x86_64/zero-page-rela-issue-1064.test @@ -7,8 +7,8 @@ assert_num_funcs 1 TESTFILE=$(basename "$0") OUTFILE=${TESTFILE%.test}.OUTPUT.o -# If the issue #1064 is fixed, 'objdump -r ' should show -# R_X86_64_64 relocation like 'empty_zero_page+0x80000000'. +# If the issue #1064 is fixed, there should be a +# R_X86_64_64 relocation like 'empty_zero_page + 80000000'. # If the issue is present, there will be something like -# 'empty_zero_page-0x80000000' there instead. -objdump -r ${OUTFILE} | grep -q -E 'R_X86_64_64\s+empty_zero_page\+0x0*80000000' +# 'empty_zero_page - 80000000' there instead. +readelf --wide --relocs zero-page-rela-issue-1064.OUTPUT.o | grep -q -e '\.*\ + 80000000$'