This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix build after rL355577
ClosedPublic

Authored by sbc100 on Mar 6 2019, 8:16 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Mar 6 2019, 8:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2019, 8:16 PM
sbc100 added a reviewer: pcc.Mar 6 2019, 8:18 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 6 2019, 8:19 PM
This revision was automatically updated to reflect the committed changes.
pcc added a comment.Mar 6 2019, 8:32 PM

Turns own that IsUsedInRegularObject is set for lazy (archive) symbols.

Should we fix that, then?

sbc100 added a comment.Mar 6 2019, 8:40 PM
In D59074#1421058, @pcc wrote:

Turns own that IsUsedInRegularObject is set for lazy (archive) symbols.

Should we fix that, then?

It correct according to the comment in ELF/Symbols.h:

// True if the symbol was used for linking and thus need to be added to the    
// output file's symbol table. This is true for all symbols except for         
// unreferenced DSO symbols and bitcode symbols that are unreferenced except   
// by other bitcode objects.                                                   
unsigned IsUsedInRegularObj : 1;

I guess objects in archives are still regular objects.

sbc100 added a comment.Mar 6 2019, 9:02 PM
In D59074#1421058, @pcc wrote:

Turns own that IsUsedInRegularObject is set for lazy (archive) symbols.

Should we fix that, then?

It correct according to the comment in ELF/Symbols.h:

// True if the symbol was used for linking and thus need to be added to the    
// output file's symbol table. This is true for all symbols except for         
// unreferenced DSO symbols and bitcode symbols that are unreferenced except   
// by other bitcode objects.                                                   
unsigned IsUsedInRegularObj : 1;

I guess objects in archives are still regular objects.

Looks like the comment is wrong though.. so fixing: https://reviews.llvm.org/D59075