@plt problem in variable declaration

Hi
I am porting LLVM for a variant of RISC processor. I am having problem in
declaration of different types of variable.
1. When using function pointer or if function is in other translation unit
   then the declaration in assemly file generated should be like this
   .word foo@plt
2. When declaring a global variable it should come like this
   .word var1
   In this case we don't want @plt after var1.
Where should we do it and how to distinguish in between them?

Thanx n Regards
Vikram

Hi Vikram,

Where should we do it and how to distinguish in between them?

There are some changes all along the line for this. Usually
XYZISelLowering.cpp decides which method should be used attaches a
special modifier to the global operand while lowering globals, then
when creating an MCInst this gets propagated to a slightly different
modifier for printing & emission.

ARM does something very similar, the key things to grep for are MO_PLT
(the one created early in ISelLowering) and VK_PLT (LLVM's generic
"use @PLT for this" tag) in lib/Target/ARM.

Cheers.

Tim.