POLINK: warning: /SECTION:.bss ignored; section is missing.

Started by dianakirtley, September 14, 2005, 05:48:47 PM

Previous topic - Next topic

dianakirtley

POLINK: warning: /SECTION:.bss ignored; section is missing.

I am running fhla on a simple 'hello world' program and I am getting this irritating warning. I am obsessive-compulsive and I need to fix this. Please help!

Thanks!

Diana

Sevag.K

I'm afraid you're stuck with it unless you want to write your link file manually.

If you use KHLA or HIDE, you can set it up to have a custom link file that eliminates the .bss section (you can get KHLA at the aoaprogramming files section or with the HIDE download).


http://www.geocities.com/kahlinor/HIDE.html

Randall Hyde

Quote from: dianakirtley on September 14, 2005, 05:48:47 PM
POLINK: warning: /SECTION:.bss ignored; section is missing.

I am running fhla on a simple 'hello world' program and I am getting this irritating warning. I am obsessive-compulsive and I need to fix this. Please help!

Thanks!

Diana

Get a copy of Microsoft's link.exe and you won't have this problem :-)

Another alternative, as Sevag points out, is to link manually. Well, not really. All you need to do is tweak the ".linker" file that HLA produces to eliminate the line that specifies the .bss section and then use the "-@" command-line option to avoid overwriting this file on each compile.

However, the easiest solution is to add a BSS section to your program. Do this by adding a "storage" section to your program, e.g.,

storage
  dummy:byte;

This will create a BSS section and make the error go away. If you're *really* obsessive-compulsive and don't want this extra, unused, dummy declaration sitting around in your source file, then simply move one of your uninitialized STATIC variables into the storage section and you'll be in business (the STORAGE section is used for declaring uninitialized STATIC objects, so if you're *really* obsessive-compulsive, you'd want to put your uninitialized variables in the STORAGE section anyway).

Note that all variables declared in the STORAGE section *are* initialized to zero when the program is loaded into memory; so "uninitialized" isn't a 100% accurate description here.
Cheers,
Randy Hyde

Sevag.K

Quote from: Randall Hyde on September 30, 2005, 03:47:36 PM
Quote from: dianakirtley on September 14, 2005, 05:48:47 PM
POLINK: warning: /SECTION:.bss ignored; section is missing.

I am running fhla on a simple 'hello world' program and I am getting this irritating warning. I am obsessive-compulsive and I need to fix this. Please help!

Thanks!

Diana

Get a copy of Microsoft's link.exe and you won't have this problem :-)

Another alternative, as Sevag points out, is to link manually. Well, not really. All you need to do is tweak the ".linker" file that HLA produces to eliminate the line that specifies the .bss section and then use the "-@" command-line option to avoid overwriting this file on each compile.

However, the easiest solution is to add a BSS section to your program. Do this by adding a "storage" section to your program, e.g.,

storage
  dummy:byte;

This will create a BSS section and make the error go away. If you're *really* obsessive-compulsive and don't want this extra, unused, dummy declaration sitting around in your source file, then simply move one of your uninitialized STATIC variables into the storage section and you'll be in business (the STORAGE section is used for declaring uninitialized STATIC objects, so if you're *really* obsessive-compulsive, you'd want to put your uninitialized variables in the STORAGE section anyway).

Note that all variables declared in the STORAGE section *are* initialized to zero when the program is loaded into memory; so "uninitialized" isn't a 100% accurate description here.
Cheers,
Randy Hyde


I've already tried that, it seems that Polink still produces the section missing warning.
I believe this is due to a built-in optimization feature of polink which automatically merges sections that are too small to require their own section.