lkml.org 
[lkml]   [2024]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] x86/fred: Fix build with clang
From
On 1/27/24 11:46, Li, Xin3 wrote:
>>> diff --git a/arch/x86/entry/entry_64_fred.S
>>> b/arch/x86/entry/entry_64_fred.S index eedf98de7538..5427e0da190d
>>> 100644
>>> --- a/arch/x86/entry/entry_64_fred.S
>>> +++ b/arch/x86/entry/entry_64_fred.S
>>> @@ -43,13 +43,12 @@ SYM_INNER_LABEL(asm_fred_exit_user,
>> SYM_L_GLOBAL)
>>> _ASM_EXTABLE_TYPE(1b, asm_fred_entrypoint_user, EX_TYPE_ERETU)
>>> SYM_CODE_END(asm_fred_entrypoint_user)
>>>
>>> -.fill asm_fred_entrypoint_kernel - ., 1, 0xcc
>>> -
>>> /*
>>> * The new RIP value that FRED event delivery establishes is
>>> * (IA32_FRED_CONFIG & ~FFFH) + 256 for events that occur in
>>> * ring 0, i.e., asm_fred_entrypoint_user + 256.
>>> */
>>> + .fill asm_fred_entrypoint_user + 256 - ., 1, 0xcc
>>> .org asm_fred_entrypoint_user + 256
>>> SYM_CODE_START_NOALIGN(asm_fred_entrypoint_kernel)
>>> FRED_ENTER
>>
>> .fill and .org here are redundant; in fact, there two directives mean exactly the
>> same thing except that .org implicitly subtracts the current offset.
>
> Ah, right, .fill already does the job!
>
> I will remove .org.
>

Incidentally, was there a problem with .org ..., 0xcc?

Not a criticism, I just want to know to better understand current
binutils limitations.

-hpa

\
 
 \ /
  Last update: 2024-05-27 14:37    [W:0.096 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site