| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 159299
|
|
|
|
| |
llvm-svn: 156602
|
|
|
|
| |
llvm-svn: 153429
|
|
|
|
|
|
| |
entries in the relocation table before they are written out to the file.
llvm-svn: 153345
|
|
|
|
|
|
| |
Found by the clang static analyzer.
llvm-svn: 148541
|
|
|
|
| |
llvm-svn: 147136
|
|
|
|
| |
llvm-svn: 147135
|
|
|
|
| |
llvm-svn: 147133
|
|
|
|
| |
llvm-svn: 147129
|
|
|
|
| |
llvm-svn: 147124
|
|
|
|
|
|
|
|
| |
ELF relocations.
Patch by Jack Carter.
llvm-svn: 147118
|
|
|
|
| |
llvm-svn: 147115
|
|
|
|
| |
llvm-svn: 147114
|
|
|
|
|
|
| |
to Target/.
llvm-svn: 147087
|
|
|
|
|
|
| |
Other targets will follow shortly.
llvm-svn: 147060
|
|
|
|
|
|
|
| |
avoid including ADT/Triple.h in many places when the target specific bits are
moved.
llvm-svn: 147059
|
|
|
|
|
|
| |
side when the target specific bits are moved to the Target directory.
llvm-svn: 147053
|
|
|
|
|
|
|
|
|
|
|
| |
test cases where there were a lot of relocations applied relative to a large
rodata section. Gas would create a symbol for each of these whereas we would
be relative to the beginning of the rodata section. This change mimics what
gas does.
Patch by Jack Carter.
llvm-svn: 146468
|
|
|
|
|
|
|
| |
previous commit. It is strange that we see it in 32 bits. We already
have a fixme about it.
llvm-svn: 146273
|
|
|
|
|
|
|
|
| |
symbol difference. This matches gas behavior and fixes PR11513.
We still don't handle _GLOBAL_OFFSET_TABLE_ in data sections.
llvm-svn: 146238
|
|
|
|
|
|
|
|
| |
make the addend fixup code a bit more generic
Patch by Jack Carter.
llvm-svn: 145998
|
|
|
|
| |
llvm-svn: 145911
|
|
|
|
| |
llvm-svn: 145878
|
|
|
|
|
|
| |
per http://llvm.org/docs/CodingStandards.html#ll_naming
llvm-svn: 145873
|
|
|
|
| |
llvm-svn: 145112
|
|
|
|
| |
llvm-svn: 144649
|
|
|
|
| |
llvm-svn: 143738
|
|
|
|
|
|
|
| |
.symtab_shndx reading and writing together, and finally we have a testcase for
r141440.
llvm-svn: 141641
|
|
|
|
| |
llvm-svn: 141440
|
|
|
|
| |
llvm-svn: 141439
|
|
|
|
|
|
| |
patch by Cary Coutant!
llvm-svn: 141413
|
|
|
|
| |
llvm-svn: 141412
|
|
|
|
|
|
| |
Patch by Reed Kotler at Mips Technologies.
llvm-svn: 140891
|
|
|
|
|
|
|
|
| |
This is meant to be overriden by backends. Implement an override on PowerPC
which adjusts the offset by 2 for ha16/lo16 relocation kinds. This removes
a commented out hack and enables hello world to be compiled on PowerPC.
llvm-svn: 136905
|
|
|
|
| |
llvm-svn: 136868
|
|
|
|
|
|
| |
Move the reloc size assert into AsmBackend - where it is more apropos.
llvm-svn: 136855
|
|
|
|
|
|
| |
This unbreaks some tests.
llvm-svn: 136692
|
|
|
|
|
|
| |
to compile a working hello world on FreeBSD/PPC32.
llvm-svn: 136689
|
|
|
|
|
|
| |
createMCAsmBackend.
llvm-svn: 136010
|
|
|
|
| |
llvm-svn: 135930
|
|
|
|
|
|
| |
they belong.
llvm-svn: 135833
|
|
|
|
| |
llvm-svn: 135825
|
|
|
|
|
|
| |
switch. (face+palm)
llvm-svn: 132790
|
|
|
|
|
|
|
|
|
|
| |
VK_GOTOFF reloc. This matches as' behavior, but it is not clear why the linker
might need this, so I added a FIXME.
I could test this by duplicating test/MC/ELF/got.s, but it doesn't look
worthwhile.
llvm-svn: 132655
|
|
|
|
| |
llvm-svn: 132643
|
|
|
|
|
|
|
|
| |
of tBL/tBLX to R_ARM_THM_CALL (ARM ELF 4.7.1.6)
Patch by koan-sin tan.
llvm-svn: 131748
|
|
|
|
| |
llvm-svn: 131411
|
|
|
|
|
|
|
|
|
|
| |
("T is 1 if the target symbol S has type STT_FUNC and the
symbol addresses a Thumb instruction ;it is 0 otherwise."
from "ELF for the ARM Architecture" 4.7.1.2)
Patch by Koan-Sin Tan!
llvm-svn: 131406
|
|
|
|
| |
llvm-svn: 131208
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLVM and binutils.
With this patch, there are no functional differences between the .o
produced directly from LLVM versus the .s to .o via GNU as, for relocation tags
at least, for both PIC and non-PIC modes.
Because some non-PIC reloc tags are used (legally) on PIC, so IsPCRel flag is
necessary but not sufficient to determine whether the overall codegen mode is
PIC or not. Why is this necessary? There is an incompatibility of how relocs
are emitted in the .rodata section. Binutils PIC likes to emit certain relocs
as section relative offsets. Non-PIC does not do this.
So I added a hidden switch on the ELFObjectwriter "-arm-elf-force-pic" which
forces the objectwriter to pretend that all relocs are for PIC mode.
Todo: Activate ForceARMElfPIC to true if -relocation-model=pic is selected
on llc.
Todo: There are probably more issues for PIC mode on ARM/MC/ELF...
Todo: Existing tests in MC/ARM/elf-reloc*.ll need to be converted over to .s
tests as well as expanded to cover the gamut.
llvm-svn: 131205
|