From d2d42f89d57fcb73de54ce332dc556cae481a682 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Mon, 29 Jan 2001 01:46:50 +0000 Subject: [PATCH] o Add explicit alignment to linker set definitions. On i386, data declarations will not be aligned by default. o Remove the alignment work-around for alpha. Our current alpha as(1) does not assume alignment after section switching, nor does the ia64 as(1). --- sys/sys/linker_set.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h index 01b8e6af4e1..2ee690e1d30 100644 --- a/sys/sys/linker_set.h +++ b/sys/sys/linker_set.h @@ -44,24 +44,18 @@ */ #ifdef __ELF__ -/* - * Alpha GAS needs an align before the section change. It seems to assume - * that after the .previous, it is aligned, so the following .align 3 is - * ignored. Since the previous instructions often contain strings, this is - * a problem. - */ - #if defined(__alpha__) || defined(__ia64__) #define MAKE_SET(set, sym) \ static void const * const __set_##set##_sym_##sym = &sym; \ - __asm(".p2align 3"); \ __asm(".section .set." #set ",\"aw\""); \ + __asm(".p2align 3"); \ __asm(".quad " #sym); \ __asm(".previous") #else #define MAKE_SET(set, sym) \ static void const * const __set_##set##_sym_##sym = &sym; \ __asm(".section .set." #set ",\"aw\""); \ + __asm(".p2align 2"); \ __asm(".long " #sym); \ __asm(".previous") #endif