[LLVMdev] MCStreamer interface

Eugene Toder eltoder at gmail.com
Wed May 5 14:52:52 PDT 2010


Re having all fragments associated with some symbol -- this makes
sense if you think in high level terms and assume all symbols to be
some "objects". All data (fragments) you want to output is associated
with some "object" (symbol). However, that's probably too high level
thinking for MC interface. High level objects might not directly
correspond to object-file level symbols. For example, module level
inline assembler does not correspond to any symbol, or function may
have more than one symbol when aliases are used.

Common is not .bss, it's an archaic concept inherited from Fortran. C
language specifies that global uninitialized variables are put into
common. This isn't for "programs that forget to use extern" -- you
can't get the same behaviour with extern, common variables are glued
together and with "normal" variables, so no object is exclusively owns
the variable. There's also some subtle difference when linking
archives.

Eugene

On Wed, May 5, 2010 at 10:32 PM, Nathan Jeffords
<blunted2night at gmail.com> wrote:
>>
>> Global definitions like "int x;" are treated as common to allow
>> linking buggy programs that forget to use "extern" on declarations.
>
> Is this always the behavior, or only when certain options are set? This
> seems like a violation of the language standard.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>




More information about the llvm-dev mailing list