All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Fixes to build with lld 6.0.0
@ 2018-07-11 15:34 Roger Pau Monne
  2018-07-11 15:34 ` [PATCH v3 1/3] xen/x86: replace '||' usage in the linker script Roger Pau Monne
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Roger Pau Monne @ 2018-07-11 15:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Roger Pau Monne

Hello,

The following 3 patches allow building the hypervisor with lld 6.0.0.

The only difference between v2 is the split into multiple patches.

Thanks, Roger.

Roger Pau Monne (3):
  xen/x86: replace '||' usage in the linker script
  xen/compiler: introduce a define for weak symbols
  xen/x86: declare the efi symbol as weak

 xen/arch/x86/xen.lds.S              | 4 +---
 xen/include/xen/compiler.h          | 2 ++
 xen/include/xen/efi.h               | 2 +-
 xen/include/xen/livepatch_payload.h | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v3 1/3] xen/x86: replace '||' usage in the linker script
  2018-07-11 15:34 [PATCH v3 0/3] Fixes to build with lld 6.0.0 Roger Pau Monne
@ 2018-07-11 15:34 ` Roger Pau Monne
  2018-07-12 11:38   ` Daniel Kiper
  2018-07-11 15:34 ` [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols Roger Pau Monne
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 21+ messages in thread
From: Roger Pau Monne @ 2018-07-11 15:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Daniel Kiper, Jan Beulich, Roger Pau Monne

With '|'. The result is the same, and the later works with lld. Fixes
the following error when building Xen with lld:

ld    -melf_x86_64_fbsd  -T xen.lds -N prelink.o --build-id=sha1 \
    /root/src/xen/xen/common/symbols-dummy.o -o /root/src/xen/xen/.xen-syms.0
ld: error: xen.lds:260: malformed number: |
>>> ASSERT(__image_base__ > (((((((((261 >> 8) * 0xffff000000000000) | (261 << 39))) + ((1 << 39) / 2)) + (64 << 30)) + (1 << 30)) + (1 << 30))) ||
>>>                                                                                                                                               ^

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Daniel Kiper <daniel.kiper@oracle.com>
---
 xen/arch/x86/xen.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index 70afedd31d..326e885402 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -331,7 +331,7 @@ SECTIONS
   .comment 0 : { *(.comment) }
 }
 
-ASSERT(__image_base__ > XEN_VIRT_START ||
+ASSERT(__image_base__ > XEN_VIRT_START |
        __2M_rwdata_end <= XEN_VIRT_END - NR_CPUS * PAGE_SIZE,
        "Xen image overlaps stubs area")
 
-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
  2018-07-11 15:34 [PATCH v3 0/3] Fixes to build with lld 6.0.0 Roger Pau Monne
  2018-07-11 15:34 ` [PATCH v3 1/3] xen/x86: replace '||' usage in the linker script Roger Pau Monne
@ 2018-07-11 15:34 ` Roger Pau Monne
  2018-07-12  7:29   ` Roger Pau Monné
  2018-07-12 11:37   ` Andrew Cooper
  2018-07-11 15:34 ` [PATCH v3 3/3] xen/x86: declare the efi symbol as weak Roger Pau Monne
  2018-07-11 16:15 ` [PATCH v3 0/3] Fixes to build with lld 6.0.0 Jan Beulich
  3 siblings, 2 replies; 21+ messages in thread
From: Roger Pau Monne @ 2018-07-11 15:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Daniel Kiper, Jan Beulich, Roger Pau Monne

And replace the open-coded versions already in tree. No functional
change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Daniel Kiper <daniel.kiper@oracle.com>
---
 xen/include/xen/compiler.h          | 2 ++
 xen/include/xen/livepatch_payload.h | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
index a7e05681c9..001f589655 100644
--- a/xen/include/xen/compiler.h
+++ b/xen/include/xen/compiler.h
@@ -18,6 +18,8 @@
 
 #define __packed      __attribute__((__packed__))
 
+#define __weak        __attribute__((weak))
+
 #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5))
 #define unreachable() do {} while (1)
 #else
diff --git a/xen/include/xen/livepatch_payload.h b/xen/include/xen/livepatch_payload.h
index 8f38cc2c60..4a1a96d054 100644
--- a/xen/include/xen/livepatch_payload.h
+++ b/xen/include/xen/livepatch_payload.h
@@ -24,7 +24,7 @@ typedef void livepatch_unloadcall_t(void);
  * executed in series by the livepatch infrastructure at patch load time.
  */
 #define LIVEPATCH_LOAD_HOOK(_fn) \
-    livepatch_loadcall_t *__attribute__((weak)) \
+    livepatch_loadcall_t *__weak \
         const livepatch_load_data_##_fn __section(".livepatch.hooks.load") = _fn;
 
 /*
@@ -33,7 +33,7 @@ typedef void livepatch_unloadcall_t(void);
  * Same as LOAD hook with s/load/unload/
  */
 #define LIVEPATCH_UNLOAD_HOOK(_fn) \
-     livepatch_unloadcall_t *__attribute__((weak)) \
+     livepatch_unloadcall_t *__weak \
         const livepatch_unload_data_##_fn __section(".livepatch.hooks.unload") = _fn;
 
 #endif /* __XEN_LIVEPATCH_PAYLOAD_H__ */
-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 3/3] xen/x86: declare the efi symbol as weak
  2018-07-11 15:34 [PATCH v3 0/3] Fixes to build with lld 6.0.0 Roger Pau Monne
  2018-07-11 15:34 ` [PATCH v3 1/3] xen/x86: replace '||' usage in the linker script Roger Pau Monne
  2018-07-11 15:34 ` [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols Roger Pau Monne
@ 2018-07-11 15:34 ` Roger Pau Monne
  2018-07-12 11:35   ` Daniel Kiper
  2018-07-11 16:15 ` [PATCH v3 0/3] Fixes to build with lld 6.0.0 Jan Beulich
  3 siblings, 1 reply; 21+ messages in thread
From: Roger Pau Monne @ 2018-07-11 15:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Daniel Kiper, Jan Beulich, Roger Pau Monne

This allows removing the DEFINED conditional in the linker script, and
fixes compilation with lld:

ld    -melf_x86_64_fbsd  -T xen.lds -N prelink.o --build-id=sha1 \
    /root/src/xen/xen/common/symbols-dummy.o -o /root/src/xen/xen/.xen-syms.0
ld: error: xen.lds:233: symbol not found: efi

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Daniel Kiper <daniel.kiper@oracle.com>
---
 xen/arch/x86/xen.lds.S | 2 --
 xen/include/xen/efi.h  | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index 326e885402..9fa40a6d48 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -304,8 +304,6 @@ SECTIONS
   } :text
 #endif
 
-  efi = DEFINED(efi) ? efi : .;
-
   /* Sections to be discarded */
   /DISCARD/ : {
        *(.exit.text)
diff --git a/xen/include/xen/efi.h b/xen/include/xen/efi.h
index 44b7d3ec3a..5678df72f9 100644
--- a/xen/include/xen/efi.h
+++ b/xen/include/xen/efi.h
@@ -21,7 +21,7 @@ struct efi {
     unsigned long smbios3;      /* SMBIOS v3 table */
 };
 
-extern struct efi efi;
+extern struct efi __weak efi;
 
 #ifndef __ASSEMBLY__
 
-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 0/3] Fixes to build with lld 6.0.0
  2018-07-11 15:34 [PATCH v3 0/3] Fixes to build with lld 6.0.0 Roger Pau Monne
                   ` (2 preceding siblings ...)
  2018-07-11 15:34 ` [PATCH v3 3/3] xen/x86: declare the efi symbol as weak Roger Pau Monne
@ 2018-07-11 16:15 ` Jan Beulich
  3 siblings, 0 replies; 21+ messages in thread
From: Jan Beulich @ 2018-07-11 16:15 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel

>>> On 11.07.18 at 17:34, <roger.pau@citrix.com> wrote:
> Hello,
> 
> The following 3 patches allow building the hypervisor with lld 6.0.0.
> 
> The only difference between v2 is the split into multiple patches.
> 
> Thanks, Roger.
> 
> Roger Pau Monne (3):
>   xen/x86: replace '||' usage in the linker script
>   xen/compiler: introduce a define for weak symbols
>   xen/x86: declare the efi symbol as weak

Reviewed-by: Jan Beulich <jbeulich@suse.com>

Patch 2 should have been Cc-ed to Konrad and Ross though.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
  2018-07-11 15:34 ` [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols Roger Pau Monne
@ 2018-07-12  7:29   ` Roger Pau Monné
  2018-07-24 13:42     ` Jan Beulich
  2018-07-12 11:37   ` Andrew Cooper
  1 sibling, 1 reply; 21+ messages in thread
From: Roger Pau Monné @ 2018-07-12  7:29 UTC (permalink / raw)
  To: Ross Lagerwall, Konrad Rzeszutek Wilk
  Cc: xen-devel, Daniel Kiper, Jan Beulich, Andrew Cooper

Forgot to Cc maintainers.

On Wed, Jul 11, 2018 at 05:34:49PM +0200, Roger Pau Monne wrote:
> And replace the open-coded versions already in tree. No functional
> change.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Daniel Kiper <daniel.kiper@oracle.com>
> ---
>  xen/include/xen/compiler.h          | 2 ++
>  xen/include/xen/livepatch_payload.h | 4 ++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
> index a7e05681c9..001f589655 100644
> --- a/xen/include/xen/compiler.h
> +++ b/xen/include/xen/compiler.h
> @@ -18,6 +18,8 @@
>  
>  #define __packed      __attribute__((__packed__))
>  
> +#define __weak        __attribute__((weak))
> +
>  #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5))
>  #define unreachable() do {} while (1)
>  #else
> diff --git a/xen/include/xen/livepatch_payload.h b/xen/include/xen/livepatch_payload.h
> index 8f38cc2c60..4a1a96d054 100644
> --- a/xen/include/xen/livepatch_payload.h
> +++ b/xen/include/xen/livepatch_payload.h
> @@ -24,7 +24,7 @@ typedef void livepatch_unloadcall_t(void);
>   * executed in series by the livepatch infrastructure at patch load time.
>   */
>  #define LIVEPATCH_LOAD_HOOK(_fn) \
> -    livepatch_loadcall_t *__attribute__((weak)) \
> +    livepatch_loadcall_t *__weak \
>          const livepatch_load_data_##_fn __section(".livepatch.hooks.load") = _fn;
>  
>  /*
> @@ -33,7 +33,7 @@ typedef void livepatch_unloadcall_t(void);
>   * Same as LOAD hook with s/load/unload/
>   */
>  #define LIVEPATCH_UNLOAD_HOOK(_fn) \
> -     livepatch_unloadcall_t *__attribute__((weak)) \
> +     livepatch_unloadcall_t *__weak \
>          const livepatch_unload_data_##_fn __section(".livepatch.hooks.unload") = _fn;
>  
>  #endif /* __XEN_LIVEPATCH_PAYLOAD_H__ */
> -- 
> 2.17.1
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 3/3] xen/x86: declare the efi symbol as weak
  2018-07-11 15:34 ` [PATCH v3 3/3] xen/x86: declare the efi symbol as weak Roger Pau Monne
@ 2018-07-12 11:35   ` Daniel Kiper
  2018-07-12 11:53     ` Jan Beulich
  2018-07-12 16:37     ` Roger Pau Monné
  0 siblings, 2 replies; 21+ messages in thread
From: Daniel Kiper @ 2018-07-12 11:35 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Jan Beulich, Andrew Cooper

On Wed, Jul 11, 2018 at 05:34:50PM +0200, Roger Pau Monne wrote:
> This allows removing the DEFINED conditional in the linker script, and
> fixes compilation with lld:

s/lld/LLVM linker/?

Could you mention the version of LLVM linker in the commit message?
And I am still not sure why do you insist on this patch series.
IIRC you have told us that both issues will be fixed in LLVM.

> ld    -melf_x86_64_fbsd  -T xen.lds -N prelink.o --build-id=sha1 \
>     /root/src/xen/xen/common/symbols-dummy.o -o /root/src/xen/xen/.xen-syms.0
> ld: error: xen.lds:233: symbol not found: efi
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

With this patch applied ld from binutils 2.22 complains in this way:

ld    -melf_x86_64  -T xen.lds -N prelink.o --build-id=sha1 \
            xen/common/symbols-dummy.o -o xen/.xen-syms.0
prelink.o: In function `acpi_os_get_root_pointer':
xen/drivers/acpi/osl.c:73:(.init.text+0x192e9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
xen/drivers/acpi/osl.c:75:(.init.text+0x192f6): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
prelink.o: In function `efi_check_config':
xen/arch/x86/mpparse.c:702:(.init.text+0x238ce): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
xen/arch/x86/mpparse.c:706:(.init.text+0x238f2): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
prelink.o: In function `dmi_efi_iterate':
xen/arch/x86/dmi_scan.c:377:(.init.text+0x3666f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
xen/arch/x86/dmi_scan.c:391:(.init.text+0x366d7): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
xen/arch/x86/dmi_scan.c:400:(.init.text+0x36735): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
xen/arch/x86/dmi_scan.c:414:(.init.text+0x367b1): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'

Everything works with binutils 2.28.

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
  2018-07-11 15:34 ` [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols Roger Pau Monne
  2018-07-12  7:29   ` Roger Pau Monné
@ 2018-07-12 11:37   ` Andrew Cooper
  2018-07-12 11:54     ` Jan Beulich
  1 sibling, 1 reply; 21+ messages in thread
From: Andrew Cooper @ 2018-07-12 11:37 UTC (permalink / raw)
  To: Roger Pau Monne, xen-devel; +Cc: Daniel Kiper, Jan Beulich

On 11/07/18 16:34, Roger Pau Monne wrote:
> And replace the open-coded versions already in tree. No functional
> change.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Daniel Kiper <daniel.kiper@oracle.com>
> ---
>  xen/include/xen/compiler.h          | 2 ++
>  xen/include/xen/livepatch_payload.h | 4 ++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
> index a7e05681c9..001f589655 100644
> --- a/xen/include/xen/compiler.h
> +++ b/xen/include/xen/compiler.h
> @@ -18,6 +18,8 @@
>  
>  #define __packed      __attribute__((__packed__))
>  
> +#define __weak        __attribute__((weak))

__week__  (can be fixed on commit)

Otherwise, Reivewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 1/3] xen/x86: replace '||' usage in the linker script
  2018-07-11 15:34 ` [PATCH v3 1/3] xen/x86: replace '||' usage in the linker script Roger Pau Monne
@ 2018-07-12 11:38   ` Daniel Kiper
  2018-07-12 15:26     ` Roger Pau Monné
  0 siblings, 1 reply; 21+ messages in thread
From: Daniel Kiper @ 2018-07-12 11:38 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Jan Beulich, Andrew Cooper

On Wed, Jul 11, 2018 at 05:34:48PM +0200, Roger Pau Monne wrote:
> With '|'. The result is the same, and the later works with lld. Fixes
> the following error when building Xen with lld:
>
> ld    -melf_x86_64_fbsd  -T xen.lds -N prelink.o --build-id=sha1 \
>     /root/src/xen/xen/common/symbols-dummy.o -o /root/src/xen/xen/.xen-syms.0
> ld: error: xen.lds:260: malformed number: |
> >>> ASSERT(__image_base__ > (((((((((261 >> 8) * 0xffff000000000000) | (261 << 39))) + ((1 << 39) / 2)) + (64 << 30)) + (1 << 30)) + (1 << 30))) ||
> >>>                                                                                                                                               ^
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Daniel Kiper <daniel.kiper@oracle.com>
> ---
>  xen/arch/x86/xen.lds.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
> index 70afedd31d..326e885402 100644
> --- a/xen/arch/x86/xen.lds.S
> +++ b/xen/arch/x86/xen.lds.S
> @@ -331,7 +331,7 @@ SECTIONS
>    .comment 0 : { *(.comment) }
>  }
>
> -ASSERT(__image_base__ > XEN_VIRT_START ||
> +ASSERT(__image_base__ > XEN_VIRT_START |
>         __2M_rwdata_end <= XEN_VIRT_END - NR_CPUS * PAGE_SIZE,
>         "Xen image overlaps stubs area")

I am not happy with this change. Is the same needed for any "&&"?
Anyway, if maintainers are OK with that I will just ask you to put
the comment before the ASSERT() why you use "|" instead of "||".

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 3/3] xen/x86: declare the efi symbol as weak
  2018-07-12 11:35   ` Daniel Kiper
@ 2018-07-12 11:53     ` Jan Beulich
  2018-07-12 16:37     ` Roger Pau Monné
  1 sibling, 0 replies; 21+ messages in thread
From: Jan Beulich @ 2018-07-12 11:53 UTC (permalink / raw)
  To: Roger Pau Monne, Daniel Kiper; +Cc: Andrew Cooper, xen-devel

>>> On 12.07.18 at 13:35, <daniel.kiper@oracle.com> wrote:
> On Wed, Jul 11, 2018 at 05:34:50PM +0200, Roger Pau Monne wrote:
>> This allows removing the DEFINED conditional in the linker script, and
>> fixes compilation with lld:
> 
> s/lld/LLVM linker/?
> 
> Could you mention the version of LLVM linker in the commit message?
> And I am still not sure why do you insist on this patch series.
> IIRC you have told us that both issues will be fixed in LLVM.
> 
>> ld    -melf_x86_64_fbsd  -T xen.lds -N prelink.o --build-id=sha1 \
>>     /root/src/xen/xen/common/symbols-dummy.o -o /root/src/xen/xen/.xen-syms.0
>> ld: error: xen.lds:233: symbol not found: efi
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> With this patch applied ld from binutils 2.22 complains in this way:
> 
> ld    -melf_x86_64  -T xen.lds -N prelink.o --build-id=sha1 \
>             xen/common/symbols-dummy.o -o xen/.xen-syms.0
> prelink.o: In function `acpi_os_get_root_pointer':
> xen/drivers/acpi/osl.c:73:(.init.text+0x192e9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> xen/drivers/acpi/osl.c:75:(.init.text+0x192f6): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> prelink.o: In function `efi_check_config':
> xen/arch/x86/mpparse.c:702:(.init.text+0x238ce): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> xen/arch/x86/mpparse.c:706:(.init.text+0x238f2): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> prelink.o: In function `dmi_efi_iterate':
> xen/arch/x86/dmi_scan.c:377:(.init.text+0x3666f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> xen/arch/x86/dmi_scan.c:391:(.init.text+0x366d7): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> xen/arch/x86/dmi_scan.c:400:(.init.text+0x36735): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> xen/arch/x86/dmi_scan.c:414:(.init.text+0x367b1): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'

Oh, I could indeed have thought of this risk.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
  2018-07-12 11:37   ` Andrew Cooper
@ 2018-07-12 11:54     ` Jan Beulich
  0 siblings, 0 replies; 21+ messages in thread
From: Jan Beulich @ 2018-07-12 11:54 UTC (permalink / raw)
  To: Andrew Cooper, Roger Pau Monne; +Cc: xen-devel, Daniel Kiper

>>> On 12.07.18 at 13:37, <andrew.cooper3@citrix.com> wrote:
> On 11/07/18 16:34, Roger Pau Monne wrote:
>> And replace the open-coded versions already in tree. No functional
>> change.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> ---
>> Cc: Jan Beulich <jbeulich@suse.com>
>> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>> Cc: Daniel Kiper <daniel.kiper@oracle.com>
>> ---
>>  xen/include/xen/compiler.h          | 2 ++
>>  xen/include/xen/livepatch_payload.h | 4 ++--
>>  2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
>> index a7e05681c9..001f589655 100644
>> --- a/xen/include/xen/compiler.h
>> +++ b/xen/include/xen/compiler.h
>> @@ -18,6 +18,8 @@
>>  
>>  #define __packed      __attribute__((__packed__))
>>  
>> +#define __weak        __attribute__((weak))
> 
> __week__  (can be fixed on commit)

Oh, indeed, as long as you mean __weak__.

> Otherwise, Reivewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 1/3] xen/x86: replace '||' usage in the linker script
  2018-07-12 11:38   ` Daniel Kiper
@ 2018-07-12 15:26     ` Roger Pau Monné
  2018-07-13 10:17       ` Daniel Kiper
  0 siblings, 1 reply; 21+ messages in thread
From: Roger Pau Monné @ 2018-07-12 15:26 UTC (permalink / raw)
  To: Daniel Kiper; +Cc: xen-devel, Jan Beulich, Andrew Cooper

On Thu, Jul 12, 2018 at 01:38:21PM +0200, Daniel Kiper wrote:
> On Wed, Jul 11, 2018 at 05:34:48PM +0200, Roger Pau Monne wrote:
> > With '|'. The result is the same, and the later works with lld. Fixes
> > the following error when building Xen with lld:
> >
> > ld    -melf_x86_64_fbsd  -T xen.lds -N prelink.o --build-id=sha1 \
> >     /root/src/xen/xen/common/symbols-dummy.o -o /root/src/xen/xen/.xen-syms.0
> > ld: error: xen.lds:260: malformed number: |
> > >>> ASSERT(__image_base__ > (((((((((261 >> 8) * 0xffff000000000000) | (261 << 39))) + ((1 << 39) / 2)) + (64 << 30)) + (1 << 30)) + (1 << 30))) ||
> > >>>                                                                                                                                               ^
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > ---
> > Cc: Jan Beulich <jbeulich@suse.com>
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > Cc: Daniel Kiper <daniel.kiper@oracle.com>
> > ---
> >  xen/arch/x86/xen.lds.S | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
> > index 70afedd31d..326e885402 100644
> > --- a/xen/arch/x86/xen.lds.S
> > +++ b/xen/arch/x86/xen.lds.S
> > @@ -331,7 +331,7 @@ SECTIONS
> >    .comment 0 : { *(.comment) }
> >  }
> >
> > -ASSERT(__image_base__ > XEN_VIRT_START ||
> > +ASSERT(__image_base__ > XEN_VIRT_START |
> >         __2M_rwdata_end <= XEN_VIRT_END - NR_CPUS * PAGE_SIZE,
> >         "Xen image overlaps stubs area")
> 
> I am not happy with this change. Is the same needed for any "&&"?

I haven't tried, but I assume both '||' and '&&' would be equally
broken. There's no '&&' ATM anyway.

> Anyway, if maintainers are OK with that I will just ask you to put
> the comment before the ASSERT() why you use "|" instead of "||".

OK, I can add something like:

"lld (LLVM linker) version 6.0.0 doesn't support '||', so use '|'
instead."

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 3/3] xen/x86: declare the efi symbol as weak
  2018-07-12 11:35   ` Daniel Kiper
  2018-07-12 11:53     ` Jan Beulich
@ 2018-07-12 16:37     ` Roger Pau Monné
  2018-07-13 10:20       ` Daniel Kiper
  1 sibling, 1 reply; 21+ messages in thread
From: Roger Pau Monné @ 2018-07-12 16:37 UTC (permalink / raw)
  To: Daniel Kiper; +Cc: xen-devel, Jan Beulich, Andrew Cooper

On Thu, Jul 12, 2018 at 01:35:14PM +0200, Daniel Kiper wrote:
> On Wed, Jul 11, 2018 at 05:34:50PM +0200, Roger Pau Monne wrote:
> > This allows removing the DEFINED conditional in the linker script, and
> > fixes compilation with lld:
> 
> s/lld/LLVM linker/?
> 
> Could you mention the version of LLVM linker in the commit message?
> And I am still not sure why do you insist on this patch series.
> IIRC you have told us that both issues will be fixed in LLVM.

Right, but I have no idea when lld 7.0.0 will be released, much less
when it will be merged into FreeBSD base system.

> > ld    -melf_x86_64_fbsd  -T xen.lds -N prelink.o --build-id=sha1 \
> >     /root/src/xen/xen/common/symbols-dummy.o -o /root/src/xen/xen/.xen-syms.0
> > ld: error: xen.lds:233: symbol not found: efi
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> With this patch applied ld from binutils 2.22 complains in this way:
> 
> ld    -melf_x86_64  -T xen.lds -N prelink.o --build-id=sha1 \
>             xen/common/symbols-dummy.o -o xen/.xen-syms.0
> prelink.o: In function `acpi_os_get_root_pointer':
> xen/drivers/acpi/osl.c:73:(.init.text+0x192e9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> xen/drivers/acpi/osl.c:75:(.init.text+0x192f6): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> prelink.o: In function `efi_check_config':
> xen/arch/x86/mpparse.c:702:(.init.text+0x238ce): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> xen/arch/x86/mpparse.c:706:(.init.text+0x238f2): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> prelink.o: In function `dmi_efi_iterate':
> xen/arch/x86/dmi_scan.c:377:(.init.text+0x3666f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> xen/arch/x86/dmi_scan.c:391:(.init.text+0x366d7): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> xen/arch/x86/dmi_scan.c:400:(.init.text+0x36735): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'
> xen/arch/x86/dmi_scan.c:414:(.init.text+0x367b1): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `efi'

Hm, weird. I've tested with ld 2.17.50 and it worked fine. Seems like
gitlab is able to reproduce this, so let me see if I can solve it.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 1/3] xen/x86: replace '||' usage in the linker script
  2018-07-12 15:26     ` Roger Pau Monné
@ 2018-07-13 10:17       ` Daniel Kiper
  0 siblings, 0 replies; 21+ messages in thread
From: Daniel Kiper @ 2018-07-13 10:17 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: xen-devel, Jan Beulich, Andrew Cooper

On Thu, Jul 12, 2018 at 05:26:49PM +0200, Roger Pau Monné wrote:
> On Thu, Jul 12, 2018 at 01:38:21PM +0200, Daniel Kiper wrote:
> > On Wed, Jul 11, 2018 at 05:34:48PM +0200, Roger Pau Monne wrote:
> > > With '|'. The result is the same, and the later works with lld. Fixes
> > > the following error when building Xen with lld:
> > >
> > > ld    -melf_x86_64_fbsd  -T xen.lds -N prelink.o --build-id=sha1 \
> > >     /root/src/xen/xen/common/symbols-dummy.o -o /root/src/xen/xen/.xen-syms.0
> > > ld: error: xen.lds:260: malformed number: |
> > > >>> ASSERT(__image_base__ > (((((((((261 >> 8) * 0xffff000000000000) | (261 << 39))) + ((1 << 39) / 2)) + (64 << 30)) + (1 << 30)) + (1 << 30))) ||
> > > >>>                                                                                                                                               ^
> > >
> > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > > ---
> > > Cc: Jan Beulich <jbeulich@suse.com>
> > > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > > Cc: Daniel Kiper <daniel.kiper@oracle.com>
> > > ---
> > >  xen/arch/x86/xen.lds.S | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
> > > index 70afedd31d..326e885402 100644
> > > --- a/xen/arch/x86/xen.lds.S
> > > +++ b/xen/arch/x86/xen.lds.S
> > > @@ -331,7 +331,7 @@ SECTIONS
> > >    .comment 0 : { *(.comment) }
> > >  }
> > >
> > > -ASSERT(__image_base__ > XEN_VIRT_START ||
> > > +ASSERT(__image_base__ > XEN_VIRT_START |
> > >         __2M_rwdata_end <= XEN_VIRT_END - NR_CPUS * PAGE_SIZE,
> > >         "Xen image overlaps stubs area")
> >
> > I am not happy with this change. Is the same needed for any "&&"?
>
> I haven't tried, but I assume both '||' and '&&' would be equally
> broken. There's no '&&' ATM anyway.
>
> > Anyway, if maintainers are OK with that I will just ask you to put
> > the comment before the ASSERT() why you use "|" instead of "||".
>
> OK, I can add something like:
>
> "lld (LLVM linker) version 6.0.0 doesn't support '||', so use '|'
> instead."

I am OK with that.

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 3/3] xen/x86: declare the efi symbol as weak
  2018-07-12 16:37     ` Roger Pau Monné
@ 2018-07-13 10:20       ` Daniel Kiper
  0 siblings, 0 replies; 21+ messages in thread
From: Daniel Kiper @ 2018-07-13 10:20 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: xen-devel, Jan Beulich, Andrew Cooper

On Thu, Jul 12, 2018 at 06:37:33PM +0200, Roger Pau Monné wrote:
> On Thu, Jul 12, 2018 at 01:35:14PM +0200, Daniel Kiper wrote:
> > On Wed, Jul 11, 2018 at 05:34:50PM +0200, Roger Pau Monne wrote:
> > > This allows removing the DEFINED conditional in the linker script, and
> > > fixes compilation with lld:
> >
> > s/lld/LLVM linker/?
> >
> > Could you mention the version of LLVM linker in the commit message?
> > And I am still not sure why do you insist on this patch series.
> > IIRC you have told us that both issues will be fixed in LLVM.
>
> Right, but I have no idea when lld 7.0.0 will be released, much less
> when it will be merged into FreeBSD base system.

Please add something like that to the commit messages of both patches.

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
  2018-07-12  7:29   ` Roger Pau Monné
@ 2018-07-24 13:42     ` Jan Beulich
  2018-07-24 13:51       ` Daniel Kiper
                         ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Jan Beulich @ 2018-07-24 13:42 UTC (permalink / raw)
  To: Ross Lagerwall, Konrad Rzeszutek Wilk
  Cc: Andrew Cooper, Daniel Kiper, xen-devel, Roger Pau Monne

>>> On 12.07.18 at 09:29, <roger.pau@citrix.com> wrote:
> Forgot to Cc maintainers.

Konrad, Ross: Ping?

Jan

> On Wed, Jul 11, 2018 at 05:34:49PM +0200, Roger Pau Monne wrote:
>> And replace the open-coded versions already in tree. No functional
>> change.
>> 
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> ---
>> Cc: Jan Beulich <jbeulich@suse.com>
>> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>> Cc: Daniel Kiper <daniel.kiper@oracle.com>
>> ---
>>  xen/include/xen/compiler.h          | 2 ++
>>  xen/include/xen/livepatch_payload.h | 4 ++--
>>  2 files changed, 4 insertions(+), 2 deletions(-)
>> 
>> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
>> index a7e05681c9..001f589655 100644
>> --- a/xen/include/xen/compiler.h
>> +++ b/xen/include/xen/compiler.h
>> @@ -18,6 +18,8 @@
>>  
>>  #define __packed      __attribute__((__packed__))
>>  
>> +#define __weak        __attribute__((weak))
>> +
>>  #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5))
>>  #define unreachable() do {} while (1)
>>  #else
>> diff --git a/xen/include/xen/livepatch_payload.h 
> b/xen/include/xen/livepatch_payload.h
>> index 8f38cc2c60..4a1a96d054 100644
>> --- a/xen/include/xen/livepatch_payload.h
>> +++ b/xen/include/xen/livepatch_payload.h
>> @@ -24,7 +24,7 @@ typedef void livepatch_unloadcall_t(void);
>>   * executed in series by the livepatch infrastructure at patch load time.
>>   */
>>  #define LIVEPATCH_LOAD_HOOK(_fn) \
>> -    livepatch_loadcall_t *__attribute__((weak)) \
>> +    livepatch_loadcall_t *__weak \
>>          const livepatch_load_data_##_fn __section(".livepatch.hooks.load") 
> = _fn;
>>  
>>  /*
>> @@ -33,7 +33,7 @@ typedef void livepatch_unloadcall_t(void);
>>   * Same as LOAD hook with s/load/unload/
>>   */
>>  #define LIVEPATCH_UNLOAD_HOOK(_fn) \
>> -     livepatch_unloadcall_t *__attribute__((weak)) \
>> +     livepatch_unloadcall_t *__weak \
>>          const livepatch_unload_data_##_fn 
> __section(".livepatch.hooks.unload") = _fn;
>>  
>>  #endif /* __XEN_LIVEPATCH_PAYLOAD_H__ */
>> -- 
>> 2.17.1
>> 




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
  2018-07-24 13:42     ` Jan Beulich
@ 2018-07-24 13:51       ` Daniel Kiper
  2018-07-24 13:59         ` Jan Beulich
  2018-07-24 14:36       ` Ross Lagerwall
  2018-08-15 18:33       ` Konrad Rzeszutek Wilk
  2 siblings, 1 reply; 21+ messages in thread
From: Daniel Kiper @ 2018-07-24 13:51 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Ross Lagerwall, Andrew Cooper, xen-devel, Roger Pau Monne

On Tue, Jul 24, 2018 at 07:42:21AM -0600, Jan Beulich wrote:
> >>> On 12.07.18 at 09:29, <roger.pau@citrix.com> wrote:
> > Forgot to Cc maintainers.
>
> Konrad, Ross: Ping?

Daniel? Anyway, I will take a look at this no later than tomorrow.
Sorry for delay but I was swamped with other important stuff.

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
  2018-07-24 13:51       ` Daniel Kiper
@ 2018-07-24 13:59         ` Jan Beulich
  2018-07-24 14:07           ` Roger Pau Monné
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Beulich @ 2018-07-24 13:59 UTC (permalink / raw)
  To: Daniel Kiper; +Cc: Andrew Cooper, Ross Lagerwall, xen-devel, Roger Pau Monne

>>> On 24.07.18 at 15:51, <daniel.kiper@oracle.com> wrote:
> On Tue, Jul 24, 2018 at 07:42:21AM -0600, Jan Beulich wrote:
>> >>> On 12.07.18 at 09:29, <roger.pau@citrix.com> wrote:
>> > Forgot to Cc maintainers.
>>
>> Konrad, Ross: Ping?
> 
> Daniel? Anyway, I will take a look at this no later than tomorrow.
> Sorry for delay but I was swamped with other important stuff.

Well, I was sort of implying that it might take you a little longer
to get there, but the patch here is not depending on your
double checking - that's just patch 3.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
  2018-07-24 13:59         ` Jan Beulich
@ 2018-07-24 14:07           ` Roger Pau Monné
  0 siblings, 0 replies; 21+ messages in thread
From: Roger Pau Monné @ 2018-07-24 14:07 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, Daniel Kiper, xen-devel, Ross Lagerwall

On Tue, Jul 24, 2018 at 07:59:30AM -0600, Jan Beulich wrote:
> >>> On 24.07.18 at 15:51, <daniel.kiper@oracle.com> wrote:
> > On Tue, Jul 24, 2018 at 07:42:21AM -0600, Jan Beulich wrote:
> >> >>> On 12.07.18 at 09:29, <roger.pau@citrix.com> wrote:
> >> > Forgot to Cc maintainers.
> >>
> >> Konrad, Ross: Ping?
> > 
> > Daniel? Anyway, I will take a look at this no later than tomorrow.
> > Sorry for delay but I was swamped with other important stuff.
> 
> Well, I was sort of implying that it might take you a little longer
> to get there, but the patch here is not depending on your
> double checking - that's just patch 3.

Note that patch 3 has been superseded by:

https://lists.xenproject.org/archives/html/xen-devel/2018-07/msg01644.html

git://xenbits.xen.org/people/royger/xen.git efi.v4

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
  2018-07-24 13:42     ` Jan Beulich
  2018-07-24 13:51       ` Daniel Kiper
@ 2018-07-24 14:36       ` Ross Lagerwall
  2018-08-15 18:33       ` Konrad Rzeszutek Wilk
  2 siblings, 0 replies; 21+ messages in thread
From: Ross Lagerwall @ 2018-07-24 14:36 UTC (permalink / raw)
  To: Jan Beulich, Konrad Rzeszutek Wilk
  Cc: Andrew Cooper, Daniel Kiper, xen-devel, Roger Pau Monne

On 07/24/2018 02:42 PM, Jan Beulich wrote:
>>>> On 12.07.18 at 09:29, <roger.pau@citrix.com> wrote:
>> Forgot to Cc maintainers.
> 
> Konrad, Ross: Ping?
> 
> Jan
> 
>> On Wed, Jul 11, 2018 at 05:34:49PM +0200, Roger Pau Monne wrote:
>>> And replace the open-coded versions already in tree. No functional
>>> change.
>>>
>>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>>> ---
>>> Cc: Jan Beulich <jbeulich@suse.com>
>>> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>>> Cc: Daniel Kiper <daniel.kiper@oracle.com>

Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
  2018-07-24 13:42     ` Jan Beulich
  2018-07-24 13:51       ` Daniel Kiper
  2018-07-24 14:36       ` Ross Lagerwall
@ 2018-08-15 18:33       ` Konrad Rzeszutek Wilk
  2 siblings, 0 replies; 21+ messages in thread
From: Konrad Rzeszutek Wilk @ 2018-08-15 18:33 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Ross Lagerwall, Daniel Kiper, Roger Pau Monne, xen-devel, Andrew Cooper

On Tue, Jul 24, 2018 at 07:42:21AM -0600, Jan Beulich wrote:
> >>> On 12.07.18 at 09:29, <roger.pau@citrix.com> wrote:
> > Forgot to Cc maintainers.
> 
> Konrad, Ross: Ping?
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Thank you!
> 
> Jan
> 
> > On Wed, Jul 11, 2018 at 05:34:49PM +0200, Roger Pau Monne wrote:
> >> And replace the open-coded versions already in tree. No functional
> >> change.
> >> 
> >> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> >> ---
> >> Cc: Jan Beulich <jbeulich@suse.com>
> >> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> >> Cc: Daniel Kiper <daniel.kiper@oracle.com>
> >> ---
> >>  xen/include/xen/compiler.h          | 2 ++
> >>  xen/include/xen/livepatch_payload.h | 4 ++--
> >>  2 files changed, 4 insertions(+), 2 deletions(-)
> >> 
> >> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
> >> index a7e05681c9..001f589655 100644
> >> --- a/xen/include/xen/compiler.h
> >> +++ b/xen/include/xen/compiler.h
> >> @@ -18,6 +18,8 @@
> >>  
> >>  #define __packed      __attribute__((__packed__))
> >>  
> >> +#define __weak        __attribute__((weak))
> >> +
> >>  #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5))
> >>  #define unreachable() do {} while (1)
> >>  #else
> >> diff --git a/xen/include/xen/livepatch_payload.h 
> > b/xen/include/xen/livepatch_payload.h
> >> index 8f38cc2c60..4a1a96d054 100644
> >> --- a/xen/include/xen/livepatch_payload.h
> >> +++ b/xen/include/xen/livepatch_payload.h
> >> @@ -24,7 +24,7 @@ typedef void livepatch_unloadcall_t(void);
> >>   * executed in series by the livepatch infrastructure at patch load time.
> >>   */
> >>  #define LIVEPATCH_LOAD_HOOK(_fn) \
> >> -    livepatch_loadcall_t *__attribute__((weak)) \
> >> +    livepatch_loadcall_t *__weak \
> >>          const livepatch_load_data_##_fn __section(".livepatch.hooks.load") 
> > = _fn;
> >>  
> >>  /*
> >> @@ -33,7 +33,7 @@ typedef void livepatch_unloadcall_t(void);
> >>   * Same as LOAD hook with s/load/unload/
> >>   */
> >>  #define LIVEPATCH_UNLOAD_HOOK(_fn) \
> >> -     livepatch_unloadcall_t *__attribute__((weak)) \
> >> +     livepatch_unloadcall_t *__weak \
> >>          const livepatch_unload_data_##_fn 
> > __section(".livepatch.hooks.unload") = _fn;
> >>  
> >>  #endif /* __XEN_LIVEPATCH_PAYLOAD_H__ */
> >> -- 
> >> 2.17.1
> >> 
> 
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-08-15 18:33 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-11 15:34 [PATCH v3 0/3] Fixes to build with lld 6.0.0 Roger Pau Monne
2018-07-11 15:34 ` [PATCH v3 1/3] xen/x86: replace '||' usage in the linker script Roger Pau Monne
2018-07-12 11:38   ` Daniel Kiper
2018-07-12 15:26     ` Roger Pau Monné
2018-07-13 10:17       ` Daniel Kiper
2018-07-11 15:34 ` [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols Roger Pau Monne
2018-07-12  7:29   ` Roger Pau Monné
2018-07-24 13:42     ` Jan Beulich
2018-07-24 13:51       ` Daniel Kiper
2018-07-24 13:59         ` Jan Beulich
2018-07-24 14:07           ` Roger Pau Monné
2018-07-24 14:36       ` Ross Lagerwall
2018-08-15 18:33       ` Konrad Rzeszutek Wilk
2018-07-12 11:37   ` Andrew Cooper
2018-07-12 11:54     ` Jan Beulich
2018-07-11 15:34 ` [PATCH v3 3/3] xen/x86: declare the efi symbol as weak Roger Pau Monne
2018-07-12 11:35   ` Daniel Kiper
2018-07-12 11:53     ` Jan Beulich
2018-07-12 16:37     ` Roger Pau Monné
2018-07-13 10:20       ` Daniel Kiper
2018-07-11 16:15 ` [PATCH v3 0/3] Fixes to build with lld 6.0.0 Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.