Don't hard-code alignment and data declarations valid for 64-bit
machines (duh!). This was one reason why this script broke on i386. The other being that on i386 sections did not have the proper alignment. This has been fixed in sys/sys/linker_set.h.
This commit is contained in:
parent
d2d42f89d5
commit
5bcc1e51a0
@ -30,6 +30,8 @@
|
||||
|
||||
use strict;
|
||||
|
||||
my %logalign = (4 => 2, 8 => 3);
|
||||
my %datadecl = (4 => ".long", 8 => ".quad");
|
||||
my %sets = ();
|
||||
my $pointersize = 0;
|
||||
my $objdump = $ENV{'OBJDUMP'} || 'objdump';
|
||||
@ -79,9 +81,9 @@ print SETDEF0_C <<END;
|
||||
__asm__(".section .set." #set ",\\"aw\\""); \\
|
||||
__asm__(".globl " #set); \\
|
||||
__asm__(".type " #set ",\@object"); \\
|
||||
__asm__(".p2align 3"); \\
|
||||
__asm__(".p2align $logalign{$pointersize}"); \\
|
||||
__asm__(#set ":"); \\
|
||||
__asm__(".quad " #count); \\
|
||||
__asm__("$datadecl{$pointersize} " #count); \\
|
||||
__asm__(".previous")
|
||||
|
||||
#include "setdefs.h"
|
||||
@ -95,7 +97,7 @@ print SETDEF1_C <<END;
|
||||
|
||||
#define DEFINE_SET(set, count) \\
|
||||
__asm__(".section .set." #set ",\\"aw\\""); \\
|
||||
__asm__(".quad 0"); \\
|
||||
__asm__("$datadecl{$pointersize} 0"); \\
|
||||
__asm__(".previous")
|
||||
|
||||
#include "setdefs.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user