You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[llvm-readobj] - Introduce warnings for cases when unable to read strings from string tables.
Currently we have no dedicated warnings, but we return error message instead of a result.
It is generally not consistent with another warnings we have.
This change was suggested and discussed here:
https://reviews.llvm.org/D77216#1954873
This change refines error messages we report and also I had to update the API
to implement it.
Differential revision: https://reviews.llvm.org/D77399
# BROKEN-OFFSET: warning: '[[FILE]]': Unable to parse DT_STRTAB: can't map virtual address 0xfffe to the segment with index 1: the segment ends at 0x10077, which is greater than the file size (0x228)
64
-
# BROKEN-OFFSET-LLVM: LoadName: <String table is empty or was not found>
65
-
# BROKEN-OFFSET-GNU: 0x000000000000000e (SONAME) Library soname: [<String table is empty or was not found>]
64
+
# BROKEN-OFFSET: warning: '[[FILE]]': string table was not found
## Check that library names are sorted when printed.
10
10
## Document that we also sort error entries.
11
11
12
-
# NEEDED-LIBS:NeededLibraries [
13
-
# NEEDED-LIBS-NEXT: <Invalid offset 0x1111111>
14
-
# NEEDED-LIBS-NEXT: <Invalid offset 0x9999999>
15
-
# NEEDED-LIBS-NEXT: aaa
16
-
# NEEDED-LIBS-NEXT: bbb
17
-
# NEEDED-LIBS-NEXT: ccc
18
-
# NEEDED-LIBS-NEXT:]
12
+
# NEEDED-LIBS:{{^}}NeededLibraries [{{$}}
13
+
# NEEDED-LIBS-NEXT: warning: '[[FILE]]': string table at offset 0x78: unable to read the string at 0x9999a11, it goes past the end of the table (0x85){{$}}
14
+
# NEEDED-LIBS-NEXT: warning: '[[FILE]]': string table at offset 0x78: unable to read the string at 0x1111189, it goes past the end of the table (0x85){{$}}
15
+
# NEEDED-LIBS-NEXT:{{^}} <?>{{$}}
16
+
# NEEDED-LIBS-NEXT:{{^}} <?>{{$}}
17
+
# NEEDED-LIBS-NEXT:{{^}} aaa{{$}}
18
+
# NEEDED-LIBS-NEXT:{{^}} bbb{{$}}
19
+
# NEEDED-LIBS-NEXT:{{^}} ccc{{$}}
20
+
# NEEDED-LIBS-NEXT:{{^}}]{{$}}
19
21
20
22
--- !ELF
21
23
FileHeader:
@@ -56,11 +58,18 @@ ProgramHeaders:
56
58
57
59
## Check what we print when the dynamic string table is empty.
0 commit comments