mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
struct _Unwind_Exception alignment should not depend on compiler flags
__attribute__((__aligned__)) selects an alignment that depends on the micro-architecture selected by GCC flags. Enabling vector extensions may increase the allignment. This is a problem when building glibc as a collection of ELF multilibs with different GCC flags because ld.so and libc.so/libpthread.so/&c may end up with a different layout of struct pthread because of the changing offset of its struct _Unwind_Exception field. Tested-By: Matheus Castanho <msc@linux.ibm.com>
This commit is contained in:
@@ -75,15 +75,21 @@ typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code,
|
|||||||
|
|
||||||
struct _Unwind_Exception
|
struct _Unwind_Exception
|
||||||
{
|
{
|
||||||
_Unwind_Exception_Class exception_class;
|
union
|
||||||
_Unwind_Exception_Cleanup_Fn exception_cleanup;
|
{
|
||||||
_Unwind_Word private_1;
|
struct
|
||||||
_Unwind_Word private_2;
|
{
|
||||||
|
_Unwind_Exception_Class exception_class;
|
||||||
|
_Unwind_Exception_Cleanup_Fn exception_cleanup;
|
||||||
|
_Unwind_Word private_1;
|
||||||
|
_Unwind_Word private_2;
|
||||||
|
};
|
||||||
|
|
||||||
/* @@@ The IA-64 ABI says that this structure must be double-word aligned.
|
/* The IA-64 ABI says that this structure must be double-word aligned. */
|
||||||
Taking that literally does not make much sense generically. Instead we
|
_Unwind_Word unwind_exception_align[2]
|
||||||
provide the maximum alignment required by any type for the machine. */
|
__attribute__ ((__aligned__ (2 * sizeof (_Unwind_Word))));
|
||||||
} __attribute__((__aligned__));
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* The ACTIONS argument to the personality routine is a bitwise OR of one
|
/* The ACTIONS argument to the personality routine is a bitwise OR of one
|
||||||
|
Reference in New Issue
Block a user