This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386] Remove EBX usage from asm code


On 12/28/14 09:46, Evgeny Stupachenko wrote:
Hi,

The patch removes EBX usage from asm code used in libgcc/crtstuff.c
It is safe now, but potentially buggy when glibc is rebuild with GCC
5.0 as EBX is not GOT register any more.

x86 bootstrap, make check passed.

Is it ok?

Evgeny

2014-12-28  Evgeny Stupachenko  <evstupac@gmail.com>

         * gnu-user.h (CRT_GET_RFIB_DATA): Remove EBX register usage.
         * config/i386/sysv4.h (CRT_GET_RFIB_DATA): Ditto.
I don't understand the glibc reference above.

Ultimately what matters here, AFAICT is the value assigned to the parameter to CRT_GET_RFIB_DATA which should be the base of the data relative relocations. So the comment "It is safe now" seems wrong as well.

ISTM this is a critical fix as it would be possible for the PIC pseudo to be assigned to something other than %ebx when compiling libgcc/crtstuff.c. And if that happens, we'll pass in a junk value to register_frame_info_bases.

Evgeny, can you clarify why you think things are safe now, but would not be safe if glibc were to be built with the current GCC trunk?

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]