diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-01-03 11:17:48 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-01-11 16:16:58 +0100 |
commit | 4fd8bfb0f354cc2583ef90fa4b3c64e241bbcfc2 (patch) | |
tree | 37e7c85a491d87d560d48c02a77dd8fb692df2dc /include/linux | |
parent | c35c352679b729d776df41ec14c0e1177e44db3e (diff) | |
download | barebox-4fd8bfb0f354cc2583ef90fa4b3c64e241bbcfc2.tar.gz barebox-4fd8bfb0f354cc2583ef90fa4b3c64e241bbcfc2.tar.xz |
treewide: mark linker list elements with __ll_elem
To fix build with clang while using ASAN, define all linker list
elements with __ll_elem.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240103101748.2629927-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/clk.h | 2 | ||||
-rw-r--r-- | include/linux/export.h | 11 | ||||
-rw-r--r-- | include/linux/pci.h | 4 |
3 files changed, 8 insertions, 9 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h index 7657ab6fc2..333dc1b8b6 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -762,7 +762,7 @@ struct clk_hw_onecell_data { #define CLK_OF_DECLARE(name, compat, fn) \ const struct of_device_id __clk_of_table_##name \ -__attribute__ ((unused,section (".__clk_of_table"))) \ + __ll_elem(.__clk_of_table) \ = { .compatible = compat, .data = fn } void of_clk_del_provider(struct device_node *np); diff --git a/include/linux/export.h b/include/linux/export.h index 90f6ada2d5..8f47742bea 100644 --- a/include/linux/export.h +++ b/include/linux/export.h @@ -15,21 +15,20 @@ struct kernel_symbol }; /* For every exported symbol, place a struct in the __ksymtab section */ -#define __EXPORT_SYMBOL(sym, sec) \ +#define __EXPORT_SYMBOL(sym) \ extern typeof(sym) sym; \ static const char __ustrtab_##sym[] \ - __attribute__((section("__usymtab_strings"))) \ + __ll_elem(__usymtab_strings) \ = MODULE_SYMBOL_PREFIX #sym; \ static const struct kernel_symbol __usymtab_##sym \ - __used \ - __attribute__((section("__usymtab" sec), unused)) \ + __ll_elem(__usymtab) \ = { (unsigned long)&sym, __ustrtab_##sym } #define EXPORT_SYMBOL(sym) \ - __EXPORT_SYMBOL(sym, "") + __EXPORT_SYMBOL(sym) #define EXPORT_SYMBOL_GPL(sym) \ - __EXPORT_SYMBOL(sym, "") + __EXPORT_SYMBOL(sym) #else diff --git a/include/linux/pci.h b/include/linux/pci.h index 98d056624f..b3bbae36e2 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -357,8 +357,8 @@ enum pci_fixup_pass { /* Anonymous variables would be nice... */ #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \ class_shift, hook) \ - static const struct pci_fixup __PASTE(__pci_fixup_##name,__LINE__) __used \ - __attribute__((__section__(#section), aligned((sizeof(void *))))) \ + static const struct pci_fixup __PASTE(__pci_fixup_##name,__LINE__) \ + __ll_elem(section) __aligned(sizeof(void *)) \ = { vendor, device, class, class_shift, hook }; #define DECLARE_PCI_FIXUP_CLASS_EARLY(vendor, device, class, \ |