Since commit dcea997beed6 ("faddr2line: Fix overlapping text section failures, the sequel"), faddr2line is completely broken on arm64. For some reason, on arm64, the vmlinux ELF object file type is ET_DYN rather than ET_EXEC. Check for both when determining whether the object is vmlinux. Modules and vmlinux.o have type ET_REL on all arches.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -112,7 +112,9 @@ __faddr2line() { · 111 unmodified lines | ||
| 112 | 112 | # section offsets. |
| 113 | 113 | local file_type=$(${READELF} --file-header $objfile | |
| 114 | 114 | ${AWK} '$1 == "Type:" { print $2; exit }') |
| 115 | − [[ $file_type = "EXEC" ]] && is_vmlinux=1 | |
| 115 | + if [[ $file_type = "EXEC" ]] || [[ $file_type == "DYN" ]]; then | |
| 116 | + is_vmlinux=1 | |
| 117 | + fi | |
| 116 | 118 | |
| 117 | 119 | # Go through each of the object's symbols which match the func name. |
| 118 | 120 | # In rare cases there might be duplicates, in which case we print all |