Skip to contentSkip to conversation

Problem building httpd

DISCUSSION Ewald Wasscher 2 participants 4 messages Aug 17, 2002 – Aug 31, 2002 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello all,

I just anxiosly tried to build httpd from the new 0.17 release with cgi support enabled. Unfortunately it fails:

bash-2.05a$ make httpd
nasm -w+orphan-labels -w+macro-params -i../inc/ -f bin -D__LINUX__ -D__KERNEL__=24 -D__SYSCALL__=__S_KERNEL__ -D__OPTIMIZE__=__O_SIZE__ -D__ELF__ -D__ELF_MACROS__ httpd.asm httpd.asm:282: short jump is out of range
make: *** [httpd] Error 1

As I know next to nothing about assembler I wonder how one should fix that (replace jb with jmp?)

Ewald Wasscher

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 20 lines · Robin Miyagi
Quoted 17 lines · Ewald Wasscher

Hello all,

I just anxiosly tried to build httpd from the new 0.17 release with cgi support enabled. Unfortunately it fails:

bash-2.05a$ make httpd
nasm -w+orphan-labels -w+macro-params -i../inc/ -f bin -D__LINUX__

(quoted diff) +0 -2
-D__KERNEL__=24 -D__SYSCALL__=__S_KERNEL__ -D__OPTIMIZE__=__O_SIZE__
-D__ELF__ -D__ELF_MACROS__ httpd.asm

httpd.asm:282: short jump is out of range
make: *** [httpd] Error 1

As I know next to nothing about assembler I wonder how one should fix that (replace jb with jmp?)

Ewald Wasscher

Quoted 9 lines
Quoted 6 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

For which assembler was this source code written for.

For nasm 0.98.

Quoted 7 lines

The problem here is that the jump is more than 128 before, or 127 after the current instruction pointer (the jump displacement is represented by a signed one byte integer -- -128 to 127). This should be replaced by a long jump, which uses the machine integer/pointer size (4 bytes) to store the displacement.

Hah, I guessed so (I do remeber a little: I once bought a book on assembler in the days that a 80286@12mhz was a very fast pc)

Quoted 4 lines

Please send me a copy of the assembler source code.

You got it in private mail, it's httpd.asm from the asmutils 0.17 release.

Ewald

#3 lore raw
In reply to Ewald Wasscher
Quoted 10 lines · Ewald Wasscher

I just anxiosly tried to build httpd from the new 0.17 release with cgi support enabled. Unfortunately it fails:

bash-2.05a$ make httpd
nasm -w+orphan-labels -w+macro-params -i../inc/ -f bin -D__LINUX__

(quoted diff) +0 -2
-D__KERNEL__=24 -D__SYSCALL__=__S_KERNEL__ -D__OPTIMIZE__=__O_SIZE__
-D__ELF__ -D__ELF_MACROS__ httpd.asm

httpd.asm:282: short jump is out of range
make: *** [httpd] Error 1

Quoted 2 lines

As I know next to nothing about assembler I wonder how one should fix that (replace jb with jmp?)

Replace 'jb' with 'jb near'.
This will be fixed in the next release.

Signature · 2 lines
Regards,
Konstantin
#4 lore raw
Quoted 12 lines · Konstantin Boldyshev
Quoted 10 lines · Ewald Wasscher

I just anxiosly tried to build httpd from the new 0.17 release with cgi support enabled. Unfortunately it fails:

bash-2.05a$ make httpd
nasm -w+orphan-labels -w+macro-params -i../inc/ -f bin -D__LINUX__

(quoted diff) +0 -2
-D__KERNEL__=24 -D__SYSCALL__=__S_KERNEL__ -D__OPTIMIZE__=__O_SIZE__
-D__ELF__ -D__ELF_MACROS__ httpd.asm

httpd.asm:282: short jump is out of range
make: *** [httpd] Error 1

Quoted 6 lines
Quoted 2 lines

As I know next to nothing about assembler I wonder how one should fix that (replace jb with jmp?)

Replace 'jb' with 'jb near'.
This will be fixed in the next release.

With nasm 0.98.34 it builds fine though.

Greetings,

Ewald