https://bugs.llvm.org/show_bug.cgi?id=40980
Bug ID: 40980
Summary: String table section sizes are wrong when optimization
occurs
Product: tools
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: llvm-objcopy
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected],
[email protected],
[email protected],
[email protected], [email protected]
llvm-objcopy uses the StringTableBuilder class to generate its string tables.
Its section size is updated any time addString() is called. This is wrong for
two reasons:
1) If no strings are ever added, then the section size is never updated, and
remains the same as the input section size (which is the initial state of the
size).
2) If string optimization occurs as a result of StringTableBuilder's finalize()
method, the size is not updated. Simply updating it after this call is not
correct either, because that happens after assignOffsets(), after which sizes
should remain static.
Both cases should be fixed by finalizing the string table builder before
assignOffsets() is called and updating the section size at that point.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs