Re: Seg fault with hla 1.99 on Fedora 8 linux



nbaker2328 wrote:
On Feb 26, 4:36 am, DaveR <spamt...@xxxxxxxxxx> wrote:

Hi

Thanks for all the help so far. I downloaded v1.97, and got a
slightly different effect:

(the copy of 1.97 on my site is gone, BTW)

(You didn't, by any chance, overwrite /usr/hla/hlalib/hlalib.a with a later version? That won't work!)

Okay, Dave. It appears that HLA does not wear a Red Hat. I am pretty
confident that NASM does, so you might give it a try:

http://nasm.sourceforge.net/

If Nasm had a fan club, I'd be president (maybe "maximum leader", even), so I won't argue with that suggestion. However... Nasm isn't going to correspond well with AoA, which is what David would like to do...

If we're content to say "HLA doesn't wear a Red Hat", okay, but *I'd* like to know *why*! Red Hat got a different instruction set??? I don't think so!

Is fc 8 a 64-bit system? That would imply a different (G)as (not relevant with this version of HLA?) and ld. I think ld complains loudly in this case, and wouldn't link hw-without-int, either, but... The cure for that, if we encounter it, is to add "-m elf_i386" to ld's command line. I think HLA will do this... "-l" switch? (someone - not me - RTFM)

I don't think that's what's happening here. Why should HLA 1.97 produce code that apparently segfaults at a different point than 1.99? The "internal workings" of HLA differ, to be sure, but they should produce *identical* code for "print a string, print an integer", I would think. Possible change in the library code, of course, but I think version 1 of the library's pretty stable at this point. Easy to check... I don't have source for either of these versions installed right now... can look if need be.

David has revealed himself as someone who knows what to do with a core dump - something I have yet to learn (any tips?). My technique would be to simply run it in gdb or ald or asmbug and see *where* the segfault happened. Then I'd probably disassemble the executable with ndisasm to see what HLA (and ld) really did... There are better ways, I'm sure...

Unless I'm mistaken, HLA using Gas as a back end put debugging symbols in the executable(?), but HLA with "built-in Fasm" doesn't(?). If this is so, perhaps we can ask HLA to output Gas code, and assemble and link it "by hand". Might get more info out of gdb(?).

Since David's the one who's seeing the segfault, he's going to have to help track it down. Not what I'd consider a "newbie exercise"! (but I don't know how to read core dumps, so who's the "newbie"?) If you want to mail me the failing executable(s) - fbkotler at verizon.net - I'll look and see if I can see anything... No guarantees, of course.

I think I'm going to cc this to the !Yahoo! list, since Randy seems (wisely, perhaps) to be giving usenet a rest. HLA is really "not my bag", but I hate to see this left as "well, HLA doesn't work on Red Hat". That's *really* not supposed to be the case!

Best,
Frank

(I can provide Nasm "print a string, print an int" examples that "should" work on fc 8 - if it's 64-bit, Chuck can help... if you pefer to go that route, but it ain't going to match AoA!)

.



Relevant Pages

  • Re: HLA History
    ... If Nasm didn't already exist, ... > effort writing HLA (then again, ... > constant arrays as well as for memory addressing modes. ... > different, so it's nice to try and use different syntax, too. ...
    (alt.lang.asm)
  • Re: HLA v1.93 is now available
    ... NASM as a back-end to HLA? ... emit any macros to be processed by the back-end assembler. ... A syntax that is reasonably close to MASM so that the MASM strings ...
    (alt.lang.asm)
  • Re: newbie: I/O with nasm
    ... Isn't this more of HLA just supporting .obj files? ... We know that Randy isn't all that impressed by Nasm, but he gives it some space anyway - same with other "competing" assemblers, and even "competing" books... ... I guess there are some "issues" - not sure what - with linking against Delphi code... ...
    (alt.lang.asm)
  • Re: Canonical format for header files (was... who cares?)
    ... "Canonical form" does not fix this problem, ... up"...a NASM user also updates those include files...Guga adds another ... Jeremy et al run the final conversion to their syntax...might require ... (when both LuxAsm and HLA needed X-Windows files, ...
    (alt.lang.asm)
  • Re: Best Compiler
    ... > on Linux is't as easy as MSAM invoke or call? ... Your choices are mainly FASM, NASM, Gas, and HLA. ...
    (alt.lang.asm)