[patch] Don't force symbols to be globals in .thumb_set

Saleem Abdulrasool compnerd at compnerd.org
Wed Apr 30 21:43:04 PDT 2014


On Wed, Apr 30, 2014 at 8:20 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> We currently force symbols to be globals in .thumb_set. The intent
> seems to be that given
>
> .thumb_set foo, bar
>
> we emit an undefined symbol to bar if it is never defined. The side
> effect is that we mark bar as global, even if it is defined, which gas
> does not.
>
> Producing an undefined reference to bar is probably a general
> difference from MC and gas. For example, given
>
> a = b
>
> gas will produce an undefined reference to b, MC will not. I would be
> surprised if any code depends on this, but it it does, we should fix
> the general difference, not special case .thumb_set.
>

I agree that we should address this generally rather than handle the
special case in the thumb_set directive.  IMO we should fix this (as having
a reference to an undefined symbol within a pure assembler file is not
unreasonable) rather than just state that we don't generate a reference.

The change itself looks correct, my only hesitation is due to the change in
behaviour (although, if you want to do that in a separate change, that is
good enough for me).


> Cheers,
> Rafael
>

-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140430/5bdb00d8/attachment.html>


More information about the llvm-commits mailing list