File tree Expand file tree Collapse file tree 4 files changed +6
-9
lines changed
Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,10 @@ class MCSymbolGOFF : public MCSymbol {
6363 GOFF::ESDLinkageType getLinkage () const { return Linkage; }
6464
6565 GOFF::ESDBindingScope getBindingScope () const {
66- return isExternal () ? (isExported () ? GOFF::ESD_BSC_ImportExport
67- : GOFF::ESD_BSC_Library)
68- : GOFF::ESD_BSC_Section;
66+ return (isExternal () || !isDefined ()) ? isExported ()
67+ ? GOFF::ESD_BSC_ImportExport
68+ : GOFF::ESD_BSC_Library
69+ : GOFF::ESD_BSC_Section;
6970 }
7071
7172 GOFF::ESDBindingStrength getBindingStrength () const {
Original file line number Diff line number Diff line change @@ -2942,9 +2942,6 @@ bool AsmPrinter::doFinalization(Module &M) {
29422942 for (auto &GO : M.global_objects ()) {
29432943 if (GO.isDeclaration ()) {
29442944 MCSymbol *Sym = TM.getSymbol (&GO);
2945- OutStreamer->emitSymbolAttribute (Sym, GO.hasExternalWeakLinkage ()
2946- ? MCSA_WeakReference
2947- : MCSA_Global);
29482945 OutStreamer->emitSymbolAttribute (Sym, isa<Function>(GO)
29492946 ? MCSA_ELF_TypeFunction
29502947 : MCSA_ELF_TypeObject);
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ using namespace llvm;
2222MCAsmInfoGOFF::MCAsmInfoGOFF () {
2323 Data64bitsDirective = " \t .quad\t " ;
2424 HasDotTypeDotSizeDirective = false ;
25+ WeakRefDirective = " WXTRN" ;
2526 PrivateGlobalPrefix = " L#" ;
2627 PrivateLabelPrefix = " L#" ;
2728 ZeroDirective = " \t .space\t " ;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ bool MCSymbolGOFF::setSymbolAttribute(MCSymbolAttr Attribute) {
2727 case MCSA_IndirectSymbol:
2828 case MCSA_Internal:
2929 case MCSA_LazyReference:
30+ case MCSA_Local:
3031 case MCSA_NoDeadStrip:
3132 case MCSA_SymbolResolver:
3233 case MCSA_AltEntry:
@@ -54,9 +55,6 @@ bool MCSymbolGOFF::setSymbolAttribute(MCSymbolAttr Attribute) {
5455 case MCSA_Global:
5556 setExternal (true );
5657 break ;
57- case MCSA_Local:
58- setExternal (false );
59- break ;
6058 case MCSA_Weak:
6159 case MCSA_WeakReference:
6260 setExternal (true );
You can’t perform that action at this time.
0 commit comments