This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug: BSS segment in COFF files


Hi!

Friday, 12 July, 2002 Wolfgang Hesseler qv@multimediaware.com wrote:

>> If you run gcc with '--save-temps' flag, and then look into
>> 'yourfile.s' file, you'll see that uninitialized data is tagged as
>> "common" (using '.comm' directive) and is put to bss only by linker
>> when final executable is created. To turn this feature off, use
>> '-fno-common' flag when compiling your object file.

WH> This works, however only if the variables are non-static. If a 
WH> variable is static the .comm directive is still used.

.lcomm, to be precise.

That's easy to work around. Just add 'int dummy;' to your source
file compiled with gcc, and you have 4 bytes in bss section.
 
>> Not sure if it's all that needed to link gcc-produced object files
>> with watcom linker, though. For instance, for function 'func ()' gcc
>> uses _func as symbol name in object files while watcom uses 'func_'.

WH> The only problem is that some functions call external functions 
WH> like _log10. Is the cygwin1.dll source code of that function available?
WH> I did a quick search in CVS but couldn't find it.

They're from newlib. http://sources.redhat.com/newlib/

Again, i suppose Watcom runtime provide log10 function, but symbol is
probably named log10_ or log10, not _log10. And you also have to check
that calling conventions and 'float' and 'double' formats (if you're
using floats) are compatible if you want your modules to interoperate.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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