This is an archive of the discontinued LLVM Phabricator instance.

COFF: Let globals with private linkage reside in their own section
ClosedPublic

Authored by majnemer on Mar 17 2015, 1:52 PM.

Details

Summary

COFF COMDATs (for selection kinds other than 'select any') require at
least one non-section symbol in the symbol table.
Satisfy this by morally enhancing the linkage from private to internal.

Diff Detail

Repository
rL LLVM

Event Timeline

majnemer updated this revision to Diff 22125.Mar 17 2015, 1:52 PM
majnemer retitled this revision from to COFF: Let globals with private linkage reside in their own section.
majnemer updated this object.
majnemer added a reviewer: rafael.
majnemer added a subscriber: Unknown Object (MLST).
majnemer updated this revision to Diff 22134.Mar 17 2015, 2:59 PM
  • Address review comments
majnemer updated this revision to Diff 22137.Mar 17 2015, 3:28 PM
  • Address Reid's comments
rafael added inline comments.Mar 17 2015, 3:40 PM
include/llvm/IR/DataLayout.h
264 ↗(On Diff #22137)

Given the discussion of making this "the closest to private that the linker still sees", this should probably return "" on all non-macho.

test/CodeGen/ARM/Windows/long-calls.ll
13 ↗(On Diff #22137)

This is a bug fix, right? The old .L prefix would actully be visible but the L one is not?

majnemer added inline comments.Mar 17 2015, 4:11 PM
include/llvm/IR/DataLayout.h
264 ↗(On Diff #22137)

Done.

test/CodeGen/ARM/Windows/long-calls.ll
13 ↗(On Diff #22137)

It was necessary to fix because ARM and 64-bit x86 were not using MM_WinCOFF, they were using the ELF mangling.

rafael accepted this revision.Mar 17 2015, 4:13 PM
rafael edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 17 2015, 4:13 PM
majnemer updated this revision to Diff 22142.Mar 17 2015, 4:15 PM
majnemer edited edge metadata.
  • Address newest round of feedback
This revision was automatically updated to reflect the committed changes.