
Summary: In big archive , there is 32bit global symbol table and 64 bit global symbol table. llvm-ar only support 32bit global symbol table this moment, we need to support the 64 bit global symbol table. https://www.ibm.com/docs/en/aix/7.2?topic=formats-ar-file-format-big Global Symbol Tables Immediately following the member table, the archive file contains two global symbol tables. The first global symbol table locates 32-bit file members that define global symbols; the second global symbol table does the same for 64-bit file members. If the archive has no 32-bit or 64-bit file members, the respective global symbol table is omitted. The strip command can be used to delete one or both global symbol tables from the archive. The fl_gstoff field in the fixed-length header contains the offset to the 32-bit global symbol table, and the fl_gst64off contains the offset to the 64-bit global symbol table. Reviewers: James Henderson,Stephen Peckham Differential Revision: https://reviews.llvm.org/D142479
13 lines
310 B
LLVM
13 lines
310 B
LLVM
target triple = "powerpc64le-unknown-linux-gnu"
|
|
|
|
@C64 = dso_local global i32 5, align 4
|
|
@static_var64 = internal global i32 2, align 4
|
|
|
|
define dso_local signext i32 @bar64() #0 {
|
|
entry:
|
|
%0 = load i32, ptr @static_var64, align 4
|
|
%1 = load i32, ptr @C64, align 4
|
|
%add = add nsw i32 %0, %1
|
|
ret i32 %add
|
|
}
|