From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MRHwM-0008UL-0g for mharc-grub-devel@gnu.org; Wed, 15 Jul 2009 23:47:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRHwK-0008Tj-5K for grub-devel@gnu.org; Wed, 15 Jul 2009 23:47:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRHwF-0008S3-FE for grub-devel@gnu.org; Wed, 15 Jul 2009 23:47:23 -0400 Received: from [199.232.76.173] (port=50599 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRHwF-0008S0-Bd for grub-devel@gnu.org; Wed, 15 Jul 2009 23:47:19 -0400 Received: from c60.cesmail.net ([216.154.195.49]:30255) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MRHwE-0008T7-P2 for grub-devel@gnu.org; Wed, 15 Jul 2009 23:47:19 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 15 Jul 2009 23:47:16 -0400 Received: from ct.roinet.com (c-69-141-194-35.hsd1.pa.comcast.net [69.141.194.35]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 6EAF334C6D for ; Wed, 15 Jul 2009 23:56:51 -0400 (EDT) To: grub-devel@gnu.org From: Pavel Roskin Date: Wed, 15 Jul 2009 23:47:15 -0400 Message-ID: <20090716034715.29978.53910.stgit@ct.roinet.com> In-Reply-To: <20090716034703.29978.94862.stgit@ct.roinet.com> References: <20090716034703.29978.94862.stgit@ct.roinet.com> User-Agent: StGit/0.15-rc1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [PATCH 2/2] RFT: Remove ABS macro from boot/i386/pc/boot.S X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 03:47:24 -0000 ChangeLog: * boot/i386/pc/boot.S: Remove ABS macro, it's useless now. --- boot/i386/pc/boot.S | 23 +++++++++-------------- 1 files changed, 9 insertions(+), 14 deletions(-) diff --git a/boot/i386/pc/boot.S b/boot/i386/pc/boot.S index 8a8f6c7..77319a7 100644 --- a/boot/i386/pc/boot.S +++ b/boot/i386/pc/boot.S @@ -24,13 +24,8 @@ * defines for the code go here */ - /* Absolute addresses - This makes the assembler generate the address without support - from the linker. (ELF can't relocate 16-bit addresses!) */ -#define ABS(x) (x-_start+0x7c00) - /* Print message string */ -#define MSG(x) movw $ABS(x), %si; call L_message +#define MSG(x) movw $x, %si; call L_message .file "boot.S" @@ -125,7 +120,7 @@ boot_drive_check: * ljmp to the next instruction because some bogus BIOSes * jump to 07C0:0000 instead of 0000:7C00. */ - ljmp $0, $ABS(real_start) + ljmp $0, $real_start real_start: @@ -142,7 +137,7 @@ real_start: /* * Check if we have a forced disk reference here */ - movb ABS(boot_drive), %al + movb boot_drive, %al cmpb $0xff, %al je 1f movb %al, %dl @@ -154,7 +149,7 @@ real_start: MSG(notification_string) /* set %si to the disk address packet */ - movw $ABS(disk_address_packet), %si + movw $disk_address_packet, %si /* do not probe LBA if the drive is a floppy */ testb $GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl @@ -195,9 +190,9 @@ lba_mode: movw $0x0010, (%si) /* the absolute address */ - movl ABS(kernel_sector), %ebx + movl kernel_sector, %ebx movl %ebx, 8(%si) - movl ABS(kernel_sector + 4), %ebx + movl kernel_sector + 4, %ebx movl %ebx, 12(%si) /* the segment of buffer address */ @@ -265,13 +260,13 @@ L_final_init: setup_sectors: /* load logical sector start (top half) */ - movl ABS(kernel_sector + 4), %eax + movl kernel_sector + 4, %eax orl %eax, %eax jnz L_geometry_error /* load logical sector start (bottom half) */ - movl ABS(kernel_sector), %eax + movl kernel_sector, %eax /* zero %edx */ xorl %edx, %edx @@ -442,7 +437,7 @@ L_floppy_probe: * Perform floppy probe. */ - movw $ABS(probe_values-1), %si + movw $probe_values - 1, %si L_probe_loop: /* reset floppy controller INT 13h AH=0 */