Commit Graph

18 Commits

Author SHA1 Message Date
Chris Lattner 05f34394d9 remove a dead variable, PR6856
llvm-svn: 101648
2010-04-17 17:28:00 +00:00
Bruno Cardoso Lopes 2b1dc9a783 - Remove custom handling of jumptables by the elf writter (this was
a dirty hack and isn't need anymore since the last x86 code emitter patch)
- Add a target-dependent modifier to addend calculation
- Use R_X86_64_32S relocation for X86::reloc_absolute_word_sext
- Use getELFSectionFlags whenever possible
- fix getTextSection to use TLOF and emit the right text section 
- Handle global emission for static ctors, dtors and Type::PointerTyID
- Some minor fixes

llvm-svn: 78176
2009-08-05 06:57:03 +00:00
Bruno Cardoso Lopes 12e543228d Support adding relocations for data sections, handling the cases where
global declared symbols are initialized with references from other global
symbols.

llvm-svn: 76540
2009-07-21 06:51:32 +00:00
Bruno Cardoso Lopes 447b7fd4bb For PC relative relocations where symbols are defined in the same section they
are referenced, ignore the relocation entry and patch the relocatable field with
the computed symbol offset directly

llvm-svn: 76414
2009-07-20 08:52:02 +00:00
Bruno Cardoso Lopes 50bf9a60e5 Use R_X86_64_32S to handle Jump Table Index relocation entries. Hide TAI usage inside getSection* functions
llvm-svn: 76347
2009-07-18 23:24:01 +00:00
Bruno Cardoso Lopes e376b53c7b Use a better name for the label relocations while emitting them for Jump Tables
llvm-svn: 76334
2009-07-18 20:52:11 +00:00
Bruno Cardoso Lopes 484e90b45e Add support to properly reference private symbols on relocation entries.
Use proper relocation type to build relocations for JumpTables (rodata
sections).

llvm-svn: 76326
2009-07-18 19:30:09 +00:00
Bruno Cardoso Lopes 2717863900 use std::vector instead of std::list for both Section and Symbol lists because
we care more about random access than insertion/deletion of elements.

llvm-svn: 75828
2009-07-15 20:49:10 +00:00
Torok Edwin fbcc663cbf llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").

llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Torok Edwin 56d0659726 assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.

llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Bruno Cardoso Lopes eefbf1961c Remove getFunctionAlignment from TargetELFInfo and use new MachineFunction alignment method
llvm-svn: 74686
2009-07-02 02:13:13 +00:00
Bruno Cardoso Lopes a040566fec Add more methods to gather target specific elf stuff
Support for .text relocations, implementing TargetELFWriter overloaded methods for x86/x86_64.
Use a map to track global values to their symbol table indexes
Code cleanup and small fixes

llvm-svn: 73894
2009-06-22 19:16:16 +00:00
Bruno Cardoso Lopes 66189503ef Use forward declarations and move TargetELFWriterInfo impl to a new file.
llvm-svn: 73209
2009-06-11 22:13:00 +00:00
Bruno Cardoso Lopes 1656366e4d Support for ELF Visibility
Emission for globals, using the correct data sections
Function alignment can be computed for each target using TargetELFWriterInfo
Some small fixes

llvm-svn: 73201
2009-06-11 19:16:03 +00:00
Bruno Cardoso Lopes 7531e92333 x86_64 now uses the correct ELF e_machine type
llvm-svn: 72986
2009-06-06 04:29:16 +00:00
Chris Lattner f3ebc3f3d2 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Bill Wendling fa663eec17 Make d'tor out-of-line.
llvm-svn: 33585
2007-01-27 11:40:32 +00:00
Bill Wendling 2bab162501 X86 implementation of the TargetELFWriterInfo class.
llvm-svn: 33571
2007-01-27 02:54:30 +00:00