public inbox for annobin@sourceware.org
 help / color / mirror / Atom feed
From: grant@hcubed.com
To: Nick Clifton <nickc@redhat.com>
Cc: annobin@sourceware.org
Subject: Re: global-file-syms for clang
Date: Thu, 21 Mar 2024 08:32:08 -0700	[thread overview]
Message-ID: <a8509ec95a440a7bed816c9e5dcb9aea@hcubed.com> (raw)
In-Reply-To: <bee24ef1-2457-4753-9996-6da86f32737f@redhat.com>

Nick,

Thanks. As a data point, when I use the GCC toolchain, I didn't need to 
set the global-file-syms flag. I believe the issue is an interaction 
between the LLVM gold plugin and the annobin plugin and linking in LTO 
archives that have objects that have the same filename for the source. 
The LLVM gold plugin tries to bring in all the fine annobin symbols, 
rather than just bringing the annobin symbols from the first file that 
satisfies the symbols for linking.

Disabling one of the above constraints (annobin plugin, LTO) causes the 
build to complete.

I was just going to use the global-file-syms to overcome the LLVM gold 
plugin/LTO issue.

Regards,
Grant Haidinyak

On 2024-03-21 01:35, Nick Clifton wrote:
> Hi Grant,
> 
>> I need to get the global-file-syms option operation on the clang 
>> plugin. Is this already done?
> 
> No. :-(
> 
>> The reason for the ask is the project I'm working on has the same 
>> filename used and the linker is complaining about redefinition of the 
>> _annobin_{filename}_start.
> 
> Ah yes....
> 
> You could use gcc as a workaround.  (Just being cheeky).
> 
> I will ask one of my colleagues to have a look at the issue, since
> he has been making other enhancements to the clang plugin recently.
> 
> Cheers
>   Nick

  reply	other threads:[~2024-03-21 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 17:28 grant
2024-03-21  8:35 ` Nick Clifton
2024-03-21 15:32   ` grant [this message]
2024-03-21 20:47     ` Tulio Magno Quites Machado Filho
2024-03-22 20:17     ` [PATCH] Add support for global-file-syms to the clang and llvm plugins Tulio Magno Quites Machado Filho
2024-03-25 16:00       ` Nick Clifton
2024-03-25 17:19     ` global-file-syms for clang Nick Clifton
2024-03-25 17:38       ` grant
2024-03-26 11:31         ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8509ec95a440a7bed816c9e5dcb9aea@hcubed.com \
    --to=grant@hcubed.com \
    --cc=annobin@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).