Newbie - Help Linker Error/Warning (NASM + ld) 
Author Message
 Newbie - Help Linker Error/Warning (NASM + ld)

Hello everyone,

I just picked up an old asm book that peeked my interest in very low level programming.

Problem:
While trying out the obligatory "Hello World Program" I'm getting this linker error:

ld: hello.o: invalid section symbol index 0xfff1 (*ABS*) ingored

Can anyone tell me what that means? I couldn't find anything in my man pages. I get an executable and the output produced is as expected (no core dumps or anything like that), but I don't like having an error/warning there that might bite me later...

Any help is very much appreciated,
pythonhda

Platform:

Redhat 7.1 (custom kernel v2.4.19)
GNU ld version 2.10.91 (with BFD 2.10.91.0.2)
NASM version 0.98.35 compiled on Sep 12 2002

Code ( http://www.*-*-*.com/ #AEN86):

section .text
        global _start

msg     db      'Hello, World!', 0xa
len     equ     $ - msg

_start:
        mov     edx,len
        mov     ecx,msg
        mov     ebx,1
        mov     eax,4
        int     0x80

        mov     eax,1
        mov     ebx,0
        int     0x80



Mon, 04 Jul 2005 05:18:04 GMT  
 Newbie - Help Linker Error/Warning (NASM + ld)

Quote:

> ld: hello.o: invalid section symbol index 0xfff1 (*ABS*) ingored

I've never seen that, so I'm guessing, but that *might* be the "Nasm
bug" that cropped up in RedHat 7.1 (and apparently nowhere else). They
sent us a patch to fix it - I think it's 0.98.17 that it's in - but it
came back out with the next version because it broke other things. (I
understand it didn't work with RedHat either, but can't confirm that).
It seems to me that upgrading to the next version of binutils made the
"Nasm bug" go away. I see binutils is up to 2.13.90.0.2-2 - if that'll
run on your kernel, it might be worth trying a different version of ld
and see if that helps.

I don't know if that's it, but it's the only thing I can think of to
suggest. Your code looks fine.

Best,
Frank



Mon, 04 Jul 2005 07:05:41 GMT  
 Newbie - Help Linker Error/Warning (NASM + ld)
Thanks! That was it. I upgraded binutils to the version that comes with 7.3.


Mon, 04 Jul 2005 09:58:33 GMT  
 Newbie - Help Linker Error/Warning (NASM + ld)
 > Thanks! That was it. I upgraded binutils to the version that comes
 > with 7.3.

Great. Thanks for the confirmation on that! It was rather a wild guess,
but I thought it might be related to that. It may be that there *is* a
problem with Nasm - ld may be "jumping through hoops" to accomodate
something "non-standard" that Nasm's doing, but so long as it works with
"most versions"...

Best,
Frank



Mon, 04 Jul 2005 19:38:07 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. NASM help for newbie on NASM

2. Question about NASM and ld

3. Help with linker error - unresolved symbol?

4. Linker Warnings

5. Try to understand a linker Warning ;

6. Cygwin linker warning and MktClapp

7. Nasm linker

8. NASM: .EXE with VAL linker - I can't get it to work

9. HELP!!! Compile Warnings and Errors

10. Error VEEXT700: Linker Failed Error 511 when trying to compile project for DM 2.6

11. Nasm error message help?

12. NASM warning (or why C programmers should try to code in assembly)

 

 
Powered by phpBB® Forum Software