PLUGINS: Formatting.

Misformatted casts in an earier commit, oops.

svn-id: r52572
This commit is contained in:
Andre Heider 2010-09-05 21:58:45 +00:00
parent 284b23092b
commit d8b85ffcb8
15 changed files with 192 additions and 169 deletions

View file

@ -41,7 +41,7 @@ bool ARMDLObject::relocate(Elf32_Off offset, Elf32_Word size, byte *relSegment)
Elf32_Rel *rel = 0; //relocation entry
// Allocate memory for relocation table
if (!(rel = (Elf32_Rel *) malloc(size))) {
if (!(rel = (Elf32_Rel *)malloc(size))) {
warning("elfloader: Out of memory.");
return false;
}
@ -67,7 +67,7 @@ bool ARMDLObject::relocate(Elf32_Off offset, Elf32_Word size, byte *relSegment)
Elf32_Sym *sym = _symtab + (REL_INDEX(rel[i].r_info));
// Get the target instruction in the code
uint32 *target = (uint32 *) ((byte *) relSegment + rel[i].r_offset);
uint32 *target = (uint32 *)((byte *)relSegment + rel[i].r_offset);
uint32 origTarget = *target; //Save for debugging
@ -120,7 +120,7 @@ bool ARMDLObject::relocateRels(Elf32_Ehdr *ehdr, Elf32_Shdr *shdr) {
curShdr->sh_entsize == sizeof(Elf32_Rel) && // Check for proper relocation size
int32(curShdr->sh_link) == _symtab_sect && // Check that the sh_link connects to our symbol table
curShdr->sh_info < ehdr->e_shnum && // Check that the relocated section exists
(shdr[curShdr->sh_info].sh_flags & SHF_ALLOC)) { // Check if relocated section resides in memory
(shdr[curShdr->sh_info].sh_flags & SHF_ALLOC)) { // Check if relocated section resides in memory
if (curShdr->sh_type == SHT_RELA) {
warning("elfloader: RELA entries not supported yet!");