Extend the maximum label size
Brought to you by:
japheth
Would it be possible to extend the maximum label size (257 max I believe)? When you generate the ASM output of some C++ files, the decorated names are way past that limit and there is no way to recompile the file without complex surgery. I've tried to simply change the MAX_ID_LEN constant but somehow it can't match the symbols on branches then.
Nevermind that... found how to do it myself, was rather easy in the end (a uint_8 was my problem).
> Nevermind that... found how to do it myself, was rather easy in the end (a
uint_8 was my problem).
Where is this uint_8?
The current limit is 247. AFAIU this limit is pretty much dictated by the OMF format, which usually requires 1-byte size prefixes for names.
japheth
For the full story, I had to change in global.h:
MAX_LINE_LEN (set to 1200... it's more because of what Visual C++ outputs)
MAX_ID_LEN (set to 800)
Symbols.h:
in the struct asm_sym
uint_8 name_size; => uint_32 name_size;
errmsg.h:
MAXMSGLEN (set to 1200).
The last one was necessary to avoid some stack overflow when in compiled in debug mode with -d6 enabled.
The OMF format might dictate 247, but for COFF, ELF, WIN64 it makes no sense to castrate it. I will acknowledge though that to properly get rid of the limit there is quite some refactoring to do... but I am fine with the current hack :). I was able to recompile a few Visual C++ generated assembly output.