[PATCH] Change representation of dllexport/dllimport

Robinson, Paul Paul_Robinson at playstation.sony.com
Wed Sep 11 15:26:55 PDT 2013


> > From: Chandler Carruth [mailto:chandlerc at google.com]
> > Sent: Wednesday, September 11, 2013 12:22 PM
> > To: Robinson, Paul
> > Cc: Nick Lewycky; Reid Kleckner; Nico Rieck;
> reviews+D1110+public+872068f434b7231c at llvm-reviews.chandlerc.com; llvm-
> commits
> > Subject: Re: [PATCH] Change representation of dllexport/dllimport
> >
> >
> > > On Wed, Sep 11, 2013 at 12:04 PM, Robinson, Paul
> <Paul_Robinson at playstation.sony.com> wrote:
> > > It means we have a proprietary extension to ELF that does the right
> things.
> >
> > I think he was asking what it is you consider "the right things" to do
> > here. Do you have a spec or something else you can share? Without
> > knowing the exact behavior, it is essentially impossible to really
> > consider this case in designing stuff in LLVM.
> 
> Hm, I'll ask, and maybe I'll be able to say what we do in .o files
> which is really the point as far as LLVM is concerned.
> --paulr

With the caveat that I didn't actually do the work, it looks like:
- We emit lists of dllimport/dllexport symbols to a linker-command
  section, conceptually similar to what Windows does.
- We invented a DLLExportLinkOnceLinkage for the special case of inline
  functions marked dllexport.  For this we added a new IR attribute.
- We fiddled a few places in lib/Target to get the right kinds of references
  to happen (relocs & which instruction is used). These look like some
  combination of ABI stuff and "do what the linker wants to see" stuff.

Is that the kind of info you were looking for?
--paulr






More information about the llvm-commits mailing list