This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Stdcall support in binutils

"DJ Delorie" <> wrote:

> > Is it enough?
> > * Log: Take into account --kill-at (-k) while generating .exp file.
> Yes, but could you format it like all the other ChangeLog entries?
> That way, I can just cut-n-paste it.

[date of commit]  Dmitry Timoshkov  <>

    * dlltool.c (gen_exp_file): Take into account --kill-at (-k)
    while generating .exp file.

> Normally, you shouldn't need to remove the decorations.  You should
> leave them on so that you don't have runtime errors because you called
> the function the wrong way.  So, people just haven't debugged that
> option very much, because so few people really need to use it.

Well, I'm writing programs for Windows almost 10 years and have used
Borland and MS tools for that. None of them does require to specifically
add decorations to the exported names neither in the source, nor in the
def files.

I'm using gcc 2.95.2 under Linux. Just made a quick test: gcc does not
add *any* decorations to symbols declared as __attribute__((__stdcall__)).
Moreover, source files with @ symbol in the function name GNU as doesn't
assemble: @ is an invalid character. Is it a platform specific feature?
Why gcc does behave so differently? (I'm asking about gcc here, because
I hope you know at least some answers to my questions, since you are using
gcc not only under Linux)

> > Currently I'm using dllwrap to build a dll, and dlltool to build an import
> > library. Could it be unified in future?
> I added support to ld directly, to handle the common cases.  If/when
> -k becomed "common" enough, it will get unified.  Until then, it waits
> for people like you to find and fix the bugs.

ld and dlltool have completely different .def file parsers. IMO dlltool
does a much better job; giving .def file to ld directly, I managed to get a
not loadable dll. Instead of having and maintaining both of them, ld should
make use of the common parser code. I'm sorry, I won't do it myself, it's
just a suggestion to the binutils developers; I'm very busy with my current

> > Is there any way to place read only data to .rdata section instead of spreading
> > it over the whole .text? (That problem bothered me for years with djgpp).
> That's a gcc issue ( The answer is yes, but it was told
> not to.

But at least under Linux read only data is collected in the single .rodata
section. Does GCC under Linux do something special to achieve that?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]