[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: [PATCH] D58724: [gnustep-objc] Make the GNUstep v2 ABI work for Windows DLLs.
From: "Dustin L. Howett via Phabricator via cfe-commits" <cfe-commits () lists ! llvm ! org>
Date: 2019-02-28 19:07:15
Message-ID: c394cd35ce444cc2e9366eddb9967d48 () localhost ! localdomain
[Download RAW message or body]
DHowett-MSFT added inline comments.
================
Comment at: clang/lib/CodeGen/CGObjCGNU.cpp:188
+ StringRef SymbolPrefix() {
+ return CGM.getTriple().isOSBinFormatCOFF() ? "_" : "._";
----------------
theraven wrote:
> DHowett-MSFT wrote:
> > Should this be `SymbolPrefix()` or something more like `MangleSymbol(StringRef \
> > sym)`? I know that right now we only need to prepend `_` or `._`, but is it more \
> > future-proof to make it generic?
> I have refactored this, and then tried adding a $ instead of the . for mangling. \
> On further testing, the latest link.exe from VS 2017 no longer complains about \
> symbols starting with a dot, so I'm inclined to revert that part of it entirely \
> (lld-link.exe was always happy). I'd prefer to minimise differences between COFF \
> and ELF and this means that we have different section names, but aside from needing \
> the extra global initialisation on COFF, everything else is the same.
The issue I had with symbols starting with `.` was in `.DEF` files specifically.
Linking a shared object containing:
```
@.exp_with_dot = dllexport global i32 0, align 4
```
without a def file, yields:
```
ordinal hint RVA name
1 0 00012900 .exp_with_dot
```
However, linking the same library with a definition file:
###test.def
```
EXPORTS
.exp_with_dot
```
yields
###output
```
test.def : fatal error LNK1242: '.exp_with_dot' is an invalid export symbol name
```
This still reproduces with 15.9.8, sadly. LINK version 14.16.27027.1.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58724/new/
https://reviews.llvm.org/D58724
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic