[llvm-commits] [llvm] r73579 - in /llvm/trunk: Makefile.rules docs/MakefileGuide.html tools/llvmc/driver/Makefile
Dale Johannesen
dalej at apple.com
Thu Jun 18 11:23:17 PDT 2009
On Jun 18, 2009, at 12:04 AMPDT, Nicolas Geoffray wrote:
> Hi Chris,
>
> Chris Lattner wrote:
>>
>> The big part of the change was to change .o -> .a. If nothing
>> references the .o file within the .a, it is quite possible that the
>> code in the .a isn't being linked in... I'm sorry for the breakage,
>> if you have any idea what the right fix is, I'd really appreciate
>> help :)
>>
>
> So there are lots of functions in vmkit that are not used in vmkit's
> source code, but that will be used at runtime. With the .o -> .a
> change,
> these functions get indeed removed from the final executable, which
> makes vmkit crash because it can't find the functions. I see two
> options
> here:
>
> a) Generate a .o again. Have you left in Makefile.rules a way to
> generate .o instead of .a?
> b) Hack the source code to force these functions to be linked. I know
> llvm is doing that a lot in its header files, but I don't know what is
> the general rule for doing that. Do you have any advices?
__attribute__((used)) should do it.
More information about the llvm-commits
mailing list