lkml.org 
[lkml]   [2023]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v5 05/20] x86/decompressor: Use proper sequence to take the address of the GOT
    On Fri, Jun 23, 2023 at 04:00:30PM +0200, Ard Biesheuvel wrote:
    > if you assemble this
    >
    > movl $_GLOBAL_OFFSET_TABLE_, %eax
    > movl $_GLOBAL_OFFSET_TABLE, %eax
    >
    > you'll end up with
    >
    > 0: b8 01 00 00 00 mov $0x1,%eax
    > 1: R_386_GOTPC _GLOBAL_OFFSET_TABLE_
    > 5: b8 00 00 00 00 mov $0x0,%eax
    > 6: R_386_32 _GLOBAL_OFFSET_TABLE
    >
    > So it is not possible to take the absolute address of
    > _GLOBAL_OFFSET_TABLE_ via an absolute relocation, you will always get
    > the relative offset instead.

    Right.

    Thx.

    --
    Regards/Gruss,
    Boris.

    https://people.kernel.org/tglx/notes-about-netiquette

    \
     
     \ /
      Last update: 2023-07-07 15:57    [W:2.323 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site