bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/19803] gc-sections breaks PE DLL variable export


From: martin.koegler at chello dot at
Subject: [Bug ld/19803] gc-sections breaks PE DLL variable export
Date: Tue, 22 Mar 2016 03:04:15 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19803

--- Comment #15 from martin.koegler at chello dot at ---
The remaining i686-w64-mingw32 problem:

It uses a different symbol name different to the exported symbol name:
Eg. testval is exported, but the symbol in the .o file is called _testval.

So symbols get removed.

dx.s:
===============
        .text
        .globl  DllMainCRTStartup
DllMainCRTStartup:
        movl    $1, %eax
        ret
        .globl  _testval
        .section .rdata,"dr"
_testval:
        .long   1
        .long   2
====================
dx.def:
=====================
EXPORTS
    testval @1 DATA
=====================

i686-w64-mingw32-as  -o dx.o  dx.s
i686-w64-mingw32-ld  -o dx.dll -shared dx.o dx1.o --print-gc-sections 
--out-implib  dx.dll.a dx.def --gc-sections
Removing unused section '.text' in file 'dx.o'
Removing unused section '.rdata' in file 'dx.o'
Removing unused section '.text' in file 'dx1.o'

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]