Hi,
I'm adapting the Functional Developer Dylan compiler so that it can work with a variety of different external linkers. (See this link (http://www.gwydiondylan.org/bugs/show_bug.cgi?id=7003) for all the gory details if you're interested.) When I try to use POLINK with the compiler's output I get:
Quote
Searching .\dylan-support.lib
Searching .\DxCMNDYL.lib
Searching .\DxDYLAN.lib
Searching C:\Program Files\PellesC\Lib\Win\kernel32.lib
Searching .\dylan-support.lib
Creating object: hello-world.exp
Loading hello-world.exp
Creating library: hello-world.lib
Discarded size: 0 bytes
POLINK: fatal error: Internal error: bss sequence.
The necessary files for doing the link are in the attachment, along with a dolink.bat file.
If there's something wrong with the COFF data I can change the compiler to accomodate it (within reason), but this error message isn't enough to go on. Any suggestions?
Hello,
No, the message isn't very informative. It just verifies an assumption, that should be handled by linker code earlier in the process: uninitialized data should always come after initialized data.
The problem, as I understand it right now, is that the size of ".dydat" is *zero*, fooling the linker into thinking it's *uninitialized* data. Since the Microsoft linker can handle this, so should I. I will test some more, and then post a new version for you to test. Probably tomorrow - going to bed now...
I guess I havn't come across an empty section since I wrote the first version of the linker. Congratulations to you for that... ;)
Pelle
Hello,
The attached linker seems to work. I don't have all the required DLL's, so I can't run the program, but the executable looks valid.
Pelle
Quote from: "Pelle"Hello,
The attached linker seems to work. I don't have all the required DLL's, so I can't run the program, but the executable looks valid.
Pelle
It does indeed work, and the program runs as expected (including debugging info). Thanks for the quick response!
I tried a few more sample programs, however, and ran into a different internal error:
QuoteCreating object: hanoi.exp
Creating library: hanoi.lib
Writing debug information
POLINK: fatal error: Internal error: convert_global_symbols.
I've attatched another build directory that demonstrates this problem.
I have only added enough CodeView types to support Pelles C - this looks a problem with one of the unsupported types. I will try to add it...
Pelle
In this case it was a problem with the CodeView symbol type S_BLOCK32. I have now added it - but there might be other missing types. Do you have a complete list of used CodeView types?
Pelle
Quote from: "Pelle"In this case it was a problem with the CodeView symbol type S_BLOCK32. I have now added it - but there might be other missing types. Do you have a complete list of used CodeView types?
Pelle
Sure:
QuoteS_COMPILE
S_REGISTER
S_UDT
S_END
S_OBJNAME
S_BPREL32
S_LDATA32
S_GDATA32
S_LPROC32
S_GPROC32
S_BLOCK32
S_LABEL32
This new version works with everything I've thrown at it so far... thanks again!
OK, they should be covered. Thanks!
Pelle
I still have this problem (POLINK: warning: Section '.bss' is missing contents flag; assuming DATA.
POLINK: fatal error: Internal error: bss sequence.) when I try to link two files of which one has an empty .bss section.