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).
This commit is contained in:
Marcel Moolenaar 2001-01-29 01:46:50 +00:00
parent 37b8a5c7bd
commit d2d42f89d5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71766

View file

@ -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