From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Behun Date: Fri, 5 Mar 2021 16:49:11 +0100 Subject: [RFC PATCH u-boot 03/12] linker_lists: declare entries and lists externally visible In-Reply-To: References: <20210303041211.26945-1-marek.behun@nic.cz> <20210303041211.26945-4-marek.behun@nic.cz> Message-ID: <20210305164911.05f7d5b7@nic.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, 5 Mar 2021 11:04:08 +0800 Bin Meng wrote: > On Wed, Mar 3, 2021 at 12:13 PM Marek Beh?n wrote: > > > > Use the `__visible` macro to declare entires and lists declared by > > ll_entry_declare() and ll_entry_declare_list() externally visible, so > > that when building with LTO the compiler does not optimize this data > > away. > > > > __visible is defined like this: > > /* > * Optional: not supported by clang > * > * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-externally_005fvisible-function-attribute > */ > #if __has_attribute(__externally_visible__) > # define __visible __attribute__((__externally_visible__)) > #else > # define __visible > #endif > > It says clang does not support this. So what about clang? > > > Signed-off-by: Marek Beh?n > > --- > > include/linker_lists.h | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > Regards, > Bin Bin, this is already changed to something different on my github. I will send new version once I am satisfied with CI tests. Marek