This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Support for Intel X1000


On 05/13/2015 07:08 PM, dalias@libc.org wrote:

> Also, since it's not just glibc you would have to hack the lock prefix
> out of, but also all code generated by GCC or other compilers and any
> hand-written asm, it would make a lot more sense to put the hack that
> NOPs out the lock prefix into the assembler. Then you can just build
> all programs with the hacked binutils and get working binaries.

-momit-lock-prefix already exists in gas:

<https://sourceware.org/binutils/docs/as/i386_002dOptions.html>

Unfortunately, just does that:

      /* Some processors fail on LOCK prefix. This options makes
         assembler ignore LOCK prefix and serves as a workaround.  */
      if (omit_lock_prefix)
        {
          if (i.tm.base_opcode == LOCK_PREFIX_OPCODE)
            return;
          i.prefix[LOCK_PREFIX] = 0;
        }

Which means that instruction offsets change, hardly a conservative approach.

-- 
Florian Weimer / Red Hat Product Security


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