bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/351] [PATCH] dlltool doesn't honour aliases in .def files.


From: carlo at alinoe dot com
Subject: [Bug binutils/351] [PATCH] dlltool doesn't honour aliases in .def files.
Date: 6 Sep 2004 15:07:44 -0000

------- Additional Comments From carlo at alinoe dot com  2004-09-06 15:07 
-------
Heya,

there turns out to be a bug in the patch that I submitted.
exp->internal_name is always non-NULL because it is already
set to whatever exp->name is in def_exports.

As a result, now xlate() is never called for idata$6 entries,
disabling the effect of --kill-at and --add-underscore.

I propose to fix this by using the same test as is being
used in gen_def_file, which generates the '= internalname' part
only when exp->internal_name and exp->name are different.

So, the code then should become:

    char const* internal_name =
        (strcmp (exp->name, exp->internal_name) == 0) ?
            xlate (exp->name) : exp->internal_name;

instead of

    char const* internal_name = exp->internal_name ?
        exp->internal_name : exp->name;

It is not 100% trivial though, because one should realize
that when one does:

address@hidden
address@hidden = address@hidden
address@hidden = address@hidden

and then uses --kill-at, then the internal name used
for address@hidden becomes 'foo' (as per --kill-at), the internal
of address@hidden becomes address@hidden because here --kill-at is ignored,
but counter intuitive, the internal name of address@hidden becomes
'boo' still.  It seems more logical to also not call xlate
in that case; then a boolean has to be added to
struct export in order to remember if 'internal_name' was
given explicitely or not.

Which solution does have your preference?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


http://sources.redhat.com/bugzilla/show_bug.cgi?id=351

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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