summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-17 16:17:35 -0400
committermidipix <writeonce@midipix.org>2016-04-17 17:35:35 -0400
commitfbb80bbae0922694102e7afb4358d46da28889d2 (patch)
tree5a649ea2db3c0fe267ab1f656a4d111b699c5fc0 /src
parent1677f4527a6413758a02fb36b430adf6a921a964 (diff)
downloadslibtool-fbb80bbae0922694102e7afb4358d46da28889d2.tar.bz2
slibtool-fbb80bbae0922694102e7afb4358d46da28889d2.tar.xz
link mode: PE support: added symdef generation.
Diffstat (limited to 'src')
-rw-r--r--src/logic/slbt_exec_link.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 7cf671a..d205623 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -504,6 +504,7 @@ static int slbt_exec_link_create_library(
char cwd [PATH_MAX];
char output [PATH_MAX];
char soname [PATH_MAX];
+ char symfile[PATH_MAX];
struct slbt_deps_meta depsmeta = {0};
/* initial state */
@@ -543,6 +544,17 @@ static int slbt_exec_link_create_library(
*ectx->lsoname = soname;
}
+ /* PE: --output-def */
+ if (dctx->cctx->drvflags & SLBT_DRIVER_IMAGE_PE) {
+ if ((size_t)snprintf(symfile,sizeof(symfile),"-Wl,%s",
+ ectx->deffilename)
+ >= sizeof(output))
+ return -1;
+
+ *ectx->symdefs = "-Wl,--output-def";
+ *ectx->symfile = symfile;
+ }
+
/* shared object */
*ectx->dpic = "-shared";
*ectx->fpic = "-fPIC";