History log of /external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4ef61f2ad4ff509ee05c7051d359009511f81226 15-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Cleanup relocation sorting for ELF.

We want the order to be deterministic on all platforms. NAKAMURA Takumi
fixed that in r181864. This patch is just two small cleanups:

* Move the function to the cpp file. It is only passed to array_pod_sort.
* Remove the ppc implementation which is now redundant

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
db3cc56e7018f6a553ba6bea8aeb6ee32aa121d8 15-May-2013 Ulrich Weigand <ulrich.weigand@de.ibm.com> Remove MCELFObjectTargetWriter::adjustFixupOffset hack

Now that PowerPC no longer uses adjustFixupOffset, and no other
back-end (ever?) did, we can remove the infrastructure itself
(incidentally addressing a FIXME to that effect).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
9a7bf438b50fed2c77f0e2bc835defa5b4728f82 30-Jan-2013 Jack Carter <jcarter@mips.com> This patch reworks how llvm targets set
and update ELF header e_flags.

Currently gathering information such as symbol,
section and data is done by collecting it in an
MCAssembler object. From MCAssembler and MCAsmLayout
objects ELFObjectWriter::WriteObject() forms and
streams out the ELF object file.

This patch just adds a few members to the MCAssember
class to store and access the e_flag settings. It
allows for runtime additions to the e_flag by
assembler directives. The standalone assembler can
get to MCAssembler from getParser().getStreamer().getAssembler().

This patch is the generic infrastructure and will be
followed by patches for ARM and Mips for their target
specific use.

Contributer: Jack Carter



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
aa71428378c1cb491ca60041d8ba7aa110bc963d 25-Oct-2012 Adhemerval Zanella <azanella@linux.vnet.ibm.com> Initial TOC support for PowerPC64 object creation

This patch adds initial PPC64 TOC MC object creation using the small mcmodel
(a single 64K TOC) adding the some TOC relocations (R_PPC64_TOC,
R_PPC64_TOC16, and R_PPC64_TOC16DS).

The addition of 'undefinedExplicitRelSym' hook on 'MCELFObjectTargetWriter'
is meant to avoid the creation of an unreferenced ".TOC." symbol (used in
the .odp creation) as well to set the R_PPC64_TOC relocation target as the
temporary ".TOC." symbol. On PPC64 ABI, the R_PPC64_TOC relocation should
not point to any symbol.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
93ee286e8d949147f8df7f093c9bd8529a99102d 28-Jun-2012 Jack Carter <jcarter@mips.com> The ELF relocation record format is different for N64
which many Mips 64 ABIs use than for O64 which many
if not all other target ABIs use.

Most architectures have the following 64 bit relocation record format:

typedef struct
{
Elf64_Addr r_offset; /* Address of reference */
Elf64_Xword r_info; /* Symbol index and type of relocation */
} Elf64_Rel;

typedef struct
{
Elf64_Addr r_offset;
Elf64_Xword r_info;
Elf64_Sxword r_addend;
} Elf64_Rela;

Whereas N64 has the following format:

typedef struct
{
Elf64_Addr r_offset;/* Address of reference */
Elf64_Word r_sym; /* Symbol index */
Elf64_Byte r_ssym; /* Special symbol */
Elf64_Byte r_type3; /* Relocation type */
Elf64_Byte r_type2; /* Relocation type */
Elf64_Byte r_type; /* Relocation type */
} Elf64_Rel;

typedef struct
{
Elf64_Addr r_offset;/* Address of reference */
Elf64_Word r_sym; /* Symbol index */
Elf64_Byte r_ssym; /* Special symbol */
Elf64_Byte r_type3; /* Relocation type */
Elf64_Byte r_type2; /* Relocation type */
Elf64_Byte r_type; /* Relocation type */
Elf64_Sxword r_addend;
} Elf64_Rela;

The structure is the same size, but the r_info data element
is now 5 separate elements. Besides the content aspects,
endian byte reordering will be different for the area with
each element being endianized separately.

I treat this as generic and continue to pass r_type as
an integer masking and unmasking the byte sized N64
values for N64 mode. I've implemented this and it causes no
affect on other current targets.

This passes make check.

Jack


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
00ca888cccd130dd3ebcfc02cf2b9187b54d116e 24-Mar-2012 Akira Hatanaka <ahatanaka@mips.com> Add a hook in MCELFObjectTargetWriter to allow targets to sort relocation
entries in the relocation table before they are written out to the file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
84070ffbe6905f31cf369ad3f6742dfa5188332c 24-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Define trivial destructor inline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
ceb09f38845a26f0f806946a611b42c6932d6504 24-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Make GetRelocType pure virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
f3a86fb03d196994dc7923351f15d8ed9343013e 22-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Move PPC bits to lib/Target/PowerPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
69bbda03918a18bd4477bb254d51346ee3033567 22-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Move the ARM specific parts of the ELF writer to Target/ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
edae8e1e4d5bd9b59f18ecef04a248be95d8ca46 21-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Move the X86 specific bits of the ELF writer to the Target/X86 directory.

Other targets will follow shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
dc9a8a378daf432d8dcfc178507afe149706f9a6 21-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Reduce the exposure of Triple::OSType in the ELF object writer. This will
avoid including ADT/Triple.h in many places when the target specific bits are
moved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
bff66a86e6e44dc7424cd2d7719ac80630b3a5f8 18-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Move some data to the TargetWriter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp
6024c97ffa15766bc0f200ffd309d9e017ae0d4b 17-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Stub out explicit MCELFObjectTargetWriter interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCELFObjectTargetWriter.cpp