GNOME Bugzilla – Bug 586494
Generate a file containing public symbols.
Last modified: 2009-12-15 19:11:19 UTC
Please describe the problem: When using the MS linker, it requires you to either annotate all public exported functions or specify them in a definition file (.def). I'm attaching a patch which will give the compiler a new switch (--symbols). The filename provided will be the location to a file which on compilation success contains all public exported functions / symbols. This can then again be used to generate the .def file by adding a new line with EXPORTS as the first line. The reason for why not including the EXPORTS directly is that the toolchain might want to aggregate symbols from different sources. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 137094 [details] [review] --symbols switch and symbols file generation.
Is this a duplicate of bug 541548?
I would argue that is is not a duplicate, but if someone decides to annotate with __declspec(dllexport) as default for --library, we don't need a symbols switch. Even though it could be convenient to have it anyways. See my comments for bug #541548
commit 2aa61900cb7ba616dd54803cf4de7d59e7537a9b Author: Jürg Billeter <j@bitron.ch> Date: Tue Dec 15 20:06:05 2009 +0100 valac: Add --symbols option Writes the name of each exported function to the specified file. Based on patch by Haakon Sporsheim, fixes bug 586494.