lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 21 Apr 2009 01:44:36 +0200
From:	Dragoslav Zaric <dragoslav.zaric.kd@...il.com>
To:	LKML <linux-kernel@...r.kernel.org>
Subject: Address of .globl _start

Hello,

I have compiled test.s (bellow) with 'as' compiler:

-------------------------------------------------
.section .data

.globl var
var:
.long 10

.section .text

.globl _start
_start:
 movl $_start, %ebx
 jmp loop_exit

loop_exit:
  movl $1, %eax             #1 is the exit() syscall
  int $0x80

-------------------------------------------------
and got output with echo $? (reads %ebx register)
116

After that I compiled test.s (bellow) with 'as' compiler:

-------------------------------------------------
.section .data

.globl var
var:
.long 10

.section .text

.globl _start
_start:
 movl _start, %ebx
 jmp loop_exit

loop_exit:
  movl $1, %eax             #1 is the exit() syscall
  int $0x80

-------------------------------------------------
and got output with echo $? (reads %ebx register)
139

After that I compiled test.s (bellow) with 'as' compiler:

-------------------------------------------------
.section .data

.globl var
var:
.long 10

.section .text

.globl _start
_start:
 movl var, %ebx
 jmp loop_exit

loop_exit:
  movl $1, %eax             #1 is the exit() syscall
  int $0x80

-------------------------------------------------
and got output with echo $? (reads %ebx register)
10

After that I compiled test.s (bellow) with 'as' compiler:

-------------------------------------------------
.section .data

.globl var
var:
.long 10

.section .text

.globl _start
_start:
 movl $var, %ebx
 jmp loop_exit

loop_exit:
  movl $1, %eax             #1 is the exit() syscall
  int $0x80

-------------------------------------------------
and got output with echo $? (reads %ebx register)
132

So my question is, what these numbers mean ? From which
point in memory they are counted from ? From this I can conclude
that value for "movl _start, %ebx" is always 139 and it can be on
various addresses. Is this means that beginning of 'as' assembly program is
signed with value 139 ???

thanks,

Dragoslav Zaric,
[Programmer; M Sc Astrophysics]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ