Compiling code that was originally for 1.97 with 1.101 (build 13181), ld gives me the following error:
ld: section `.text' type changed to PROGBITS
It's a simple app that takes a user string and writes it to a text file.
I have been compiling it on every version of HLA I have downloaded.
What is a PROGBITS type ? (first I have seen ld return this)
Quote from: DarkWolf on March 09, 2008, 05:03:10 AM
Compiling code that was originally for 1.97 with 1.101 (build 13181), ld gives me the following error:
ld: section `.text' type changed to PROGBITS
It's a simple app that takes a user string and writes it to a text file.
I have been compiling it on every version of HLA I have downloaded.
What is a PROGBITS type ? (first I have seen ld return this)
Hmmm...
This is a new one to me.
Anyone else have an explanation?
hLater,
Randy Hyde
Using 'readelf' confirms this. Most ELF object files have '.text' set as PROGBITS type, whereas an HLA object file has it set as NOBITS. Apparently, ld is making an "on-the-fly" change to the section type.
Nathan.
This is now a bug report:
https://sourceforge.net/tracker/index.php?func=detail&aid=1916435&group_id=215104&atid=1032333
Nathan.
I find references to progbits as an optional section type that as may set for ELF targets:
http://sourceware.org/binutils/docs-2.18/as/Section.html#Section
And as a section type used in an ld mapping directive:
http://docsrv.sco.com:507/en/topics/mapfile.map_directives.html
Quote from: MichaelW on March 17, 2008, 07:45:14 AM
I find references to progbits as an optional section type that as may set for ELF targets:
http://sourceware.org/binutils/docs-2.18/as/Section.html#Section
And as a section type used in an ld mapping directive:
http://docsrv.sco.com:507/en/topics/mapfile.map_directives.html
Thanks for the info.
This may have cleared something up for me.
A big difference between HLA v1.97 and later versions under Linux is that v1.97 and before used (by default) Gas to process the source code emitted by HLA. HLA v1.98 and later started using the internal version of FASM to do this task. I suspect the problem is that the FASM .section directive I'm using isn't setting these @progbits flag. Here's the FASM directive I'm using:
section .text executable align 16
Is there a FASM option that I'm missing here?
I'll post something on the FASM board if no one around here has any ideas.
Workaround: try compiling with Gas as the back-end assembler. Use an "-xg" command-line option and see if that solves the problem (HLA object files should follow the basic a.out file format, so there shouldn't be an issue with the @progbits flag).
hLater,
Randy Hyde
That works.
I was still operating under the belief that I had to rename hla to fhla or use an option to use FASM and that it still used Gas under Linux by default.
I hadn't change any makefile for a couple of versions of hla but I'll try to keep them set for Gas specifically.