Skip to content
  1. Apr 05, 2012
    • Bill Wendling's avatar
      The internalize pass can be dangerous for LTO. · 4f60125d
      Bill Wendling authored
      Consider the following program:
      
      $ cat main.c
      void foo(void) { }
      
      int main(int argc, char *argv[]) {
          foo();
          return 0;
      }
      $ cat bundle.c 
      extern void foo(void);
      
      void bar(void) {
           foo();
      }
      $ clang -o main main.c
      $ clang -o bundle.so bundle.c -bundle -bundle_loader ./main
      $ nm -m bundle.so
      0000000000000f40 (__TEXT,__text) external _bar
                       (undefined) external _foo (from executable)
                       (undefined) external dyld_stub_binder (from libSystem)
      $ clang -o main main.c -O4
      $ clang -o bundle.so bundle.c -bundle -bundle_loader ./main
      Undefined symbols for architecture x86_64:
        "_foo", referenced from:
            _bar in bundle-elQN6d.o
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      
      The linker was told that the 'foo' in 'main' was 'internal' and had no uses, so
      it was dead stripped.
      
      Another situation is something like:
      
      define void @foo() {
        ret void
      }
      
      define void @bar() {
        call asm volatile "call _foo" ...
        ret void
      }
      
      The only use of 'foo' is inside of an inline ASM call. Since we don't look
      inside those for uses of functions, we don't specify this as a "use."
      
      Get around this by not invoking the 'internalize' pass by default. This is an
      admitted hack for LTO correctness.
      <rdar://problem/11185386>
      
      llvm-svn: 154124
      4f60125d
  2. Apr 03, 2012
  3. Apr 02, 2012
  4. Mar 31, 2012
  5. Mar 30, 2012
    • Danil Malyshev's avatar
      Re-factored RuntimeDyLd: · 70d22ccb
      Danil Malyshev authored
      1. The main works will made in the RuntimeDyLdImpl with uses the ObjectFile class. RuntimeDyLdMachO and RuntimeDyLdELF now only parses relocations and resolve it. This is allows to make improvements of the RuntimeDyLd more easily. In addition the support for COFF can be easily added.
      
      2. Added ARM relocations to RuntimeDyLdELF.
      
      3. Added support for stub functions for the ARM, allowing to do a long branch.
      
      4. Added support for external functions that are not loaded from the object files, but can be loaded from external libraries. Now MCJIT can correctly execute the code containing the printf, putc, and etc.
      
      5. The sections emitted instead functions, thanks Jim Grosbach. MemoryManager.startFunctionBody() and MemoryManager.endFunctionBody() have been removed.
      6. MCJITMemoryManager.allocateDataSection() and MCJITMemoryManager. allocateCodeSection() used JMM->allocateSpace() instead of JMM->allocateCodeSection() and JMM->allocateDataSection(), because I got an error: "Cannot allocate an allocated block!" with object file contains more than one code or data sections.
      
      llvm-svn: 153754
      70d22ccb
    • Bill Wendling's avatar
      36cbf03b
    • Bill Wendling's avatar
      Revert r153694. It was causing failures in the buildbots. · 76fdc4b8
      Bill Wendling authored
      llvm-svn: 153701
      76fdc4b8
  6. Mar 29, 2012
  7. Mar 28, 2012
  8. Mar 23, 2012
  9. Mar 22, 2012
    • Chandler Carruth's avatar
      Revert a series of commits to MCJIT to get the build working in CMake · e26dafeb
      Chandler Carruth authored
      (and hopefully on Windows). The bots have been down most of the day
      because of this, and it's not clear to me what all will be required to
      fix it.
      
      The commits started with r153205, then r153207, r153208, and r153221.
      The first commit seems to be the real culprit, but I couldn't revert
      a smaller number of patches.
      
      When resubmitting, r153207 and r153208 should be folded into r153205,
      they were simple build fixes.
      
      llvm-svn: 153241
      e26dafeb
  10. Mar 21, 2012
  11. Mar 20, 2012
  12. Mar 13, 2012
  13. Mar 11, 2012
    • Stepan Dyatkovskiy's avatar
      llvm::SwitchInst · 97b02fc1
      Stepan Dyatkovskiy authored
      Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
      Added some notes relative to case iterators.
      
      llvm-svn: 152532
      97b02fc1
  14. Mar 10, 2012
  15. Mar 09, 2012
    • David Meyer's avatar
      Support reading GNU symbol versions in ELFObjectFile · 6c614bf7
      David Meyer authored
      * Add enums and structures for GNU version information.
      * Implement extraction of that information on a per-symbol basis (ELFObjectFile::getSymbolVersion).
      * Implement a generic interface, GetELFSymbolVersion(), for getting the symbol version from the ObjectFile (hides the templating).
      * Have llvm-readobj print out the version, when available.
      * Add a test for the new feature: readobj-elf-versioning.test
      
      llvm-svn: 152436
      6c614bf7
Loading