flat assembler
Message board for the users of flat assembler.
Index
> Linux > as fails to resolve ljmp[ptr16:32] to non absolute segment |
Author |
|
revolution 10 Dec 2018, 09:53
Rewrite it in human readable fasm syntax and then I'm sure we can get it to work for you.
|
|||
10 Dec 2018, 09:53 |
|
dstyl 10 Dec 2018, 17:19
Thanks a lot, i agree with you att syntax is horrible.
And there are 2 versions of it so intel2gas didnt work. i tried to rewrite it in fasm syntax as good as i could. It compiles when extrn(i only know extern from nasm) , call bootstub and jmp 0x10:0x10f000222 are commented out. Code: ;/* ;* head.S for bootstub to load protected mode kernel ;* ;* Copyright (C) 2008-2010 Intel Corporation. ;* Author: Alek Du <alek.du@intel.com> ;*etc....*/ ;format ??? ;include "bootstub.h" ;extrn '_bootstub' doesnt work ;Unkown what this means... ;.section ".text.head","ax",@progbits" ;entry start ;GLOBAL _start cld cli ;setup stack, because we are heading off to "C" mov esp, 0x10f00000;STACK_OFFSET ;call bootstub ;doesnt work adress is seg:0x372 ;calll bootstub ??? ;after call bootstub, GDT is set, IDT is clear ;eax contains 32-bit entry of bzImage mov ebx, 0x18;__BOOT_DS mov ds,bx ;fails with mov ds, ebx mov es,bx ;// mov fs,bx ;// mov gs,bx ;// mov ss,bx ;// ;jmp FAR $__BOOT_CS,$1f jmp 0x10:0x10f000222;out of range l1: ;/* tell kernel where is boot_param */ mov esi, 0x8000;(BOOT_PARAMS_OFFSET) xor ebp, ebp xor edi, edi mov ecx, eax mov eax, [ds:0x10f01784] ;mb_magic mov ebx, DWORD PTR ds:0x10f00022 ;mb_info ;jmpl ecx ; Jump to the 32-bit entrypoint jmp ecx ;this should work??? |
|||
10 Dec 2018, 17:19 |
|
revolution 10 Dec 2018, 22:38
Code: jmp 0x10:0x10f000222;out of range |
|||
10 Dec 2018, 22:38 |
|
dstyl 11 Dec 2018, 21:01
Thanks a lot for your help, i will try "jmp 0x10:0x10f00022" in the worst case i will just paste the raw opcode from the working bootstub as hex into the binary. What still confuses me is that 2 disassemblers claim the instruction is invalid while oda says its correct and shows that out of range value.
|
|||
11 Dec 2018, 21:01 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.