NO

Author Topic: POLINK: fatal error: Internal error: bss sequence.  (Read 6171 times)

housel

  • Guest
POLINK: fatal error: Internal error: bss sequence.
« on: November 09, 2004, 10:04:39 PM »
Hi,

I'm adapting the Functional Developer Dylan compiler so that it can work with a variety of different external linkers.  (See this link 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?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POLINK: fatal error: Internal error: bss sequence.
« Reply #1 on: November 10, 2004, 12:10:29 AM »
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
/Pelle

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POLINK: fatal error: Internal error: bss sequence.
« Reply #2 on: November 10, 2004, 09:19:34 PM »
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
/Pelle

housel

  • Guest
POLINK: fatal error: Internal error: bss sequence.
« Reply #3 on: November 10, 2004, 11:01:48 PM »
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:

Quote
Creating 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.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POLINK: fatal error: Internal error: bss sequence.
« Reply #4 on: November 10, 2004, 11:17:12 PM »
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
/Pelle

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POLINK: fatal error: Internal error: bss sequence.
« Reply #5 on: November 10, 2004, 11:52:46 PM »
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
/Pelle

housel

  • Guest
POLINK: fatal error: Internal error: bss sequence.
« Reply #6 on: November 11, 2004, 12:31:07 AM »
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:

Quote
S_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!

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POLINK: fatal error: Internal error: bss sequence.
« Reply #7 on: November 11, 2004, 12:57:27 AM »
OK, they should be covered. Thanks!

Pelle
/Pelle

nn a512

  • Guest
POLINK: fatal error: Internal error: bss sequence.
« Reply #8 on: November 15, 2006, 04:41:05 PM »
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.