Hi Scott,
Just wanted to try out generation of COFF files, and with the luck I'm having over the last few days, gpasm generated a Segmentation fault... gputils is version 0.14.2. This is the message and backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x000000000041a37c in _gp_coffgen_write_reloc (object=0x6e8170, numerrors=<value optimized="" out="">)
at gpwriteobj.c:170
170 gp_fputl32(current->symbol->number, fp);
(gdb) bt
at gpwriteobj.c:170
(gdb) list
165 gp_reloc_type *current = section->relocations;
166
167 while (current != NULL) {
168
169 gp_fputl32(current->address, fp);
170 gp_fputl32(current->symbol->number, fp);
171 gp_fputl16(current->offset, fp);
172 gp_fputl16(current->type, fp);
173
174 current = current->next;
This is the first time it enters this section of the program. I added a breakpoint:
(gdb) p current
$1 = (gp_reloc_type ) 0x6fa340
(gdb) p current->symbol->number
Cannot access memory at address 0x40
(gdb) p current->symbol
$2 = (struct gp_symbol_type ) 0x0
(gdb)
Anonymous
Can you please attach the asm file which reproduces the problem an the command line used to assemble the source?
Borut
Test file causes segfault: gpasm -c boot87xa.asm
Hi Borut,
Attached a (very) simplified source file which still causes the same segmentation fault.
Hope this helps.
Apparently here is the problem:
causes segmentation fault,
works fine.
A segmentation error should not happen in any instance, so maybe a detection for this
problem could be included?
Bug fixed in svn revision #731.
Borut