Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10264 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
db4008e263
commit
53c082117f
@ -10,7 +10,6 @@ relocate_rel(image_t *image, struct Elf32_Rel *rel, int rel_len)
|
||||
{
|
||||
int i;
|
||||
struct Elf32_Sym *sym;
|
||||
int vlErr;
|
||||
addr_t S;
|
||||
addr_t final_val;
|
||||
|
||||
@ -19,20 +18,23 @@ relocate_rel(image_t *image, struct Elf32_Rel *rel, int rel_len)
|
||||
# define B (image->regions[0].delta)
|
||||
|
||||
for (i = 0; i * (int)sizeof(struct Elf32_Rel) < rel_len; i++) {
|
||||
|
||||
unsigned type = ELF32_R_TYPE(rel[i].r_info);
|
||||
|
||||
switch (ELF32_R_TYPE(rel[i].r_info)) {
|
||||
switch (type) {
|
||||
case R_386_32:
|
||||
case R_386_PC32:
|
||||
case R_386_GLOB_DAT:
|
||||
case R_386_JMP_SLOT:
|
||||
case R_386_GOTOFF:
|
||||
{
|
||||
status_t status;
|
||||
sym = SYMBOL(image, ELF32_R_SYM(rel[i].r_info));
|
||||
|
||||
vlErr = resolve_symbol(image, sym, &S);
|
||||
if(vlErr<0) {
|
||||
return vlErr;
|
||||
status = resolve_symbol(image, sym, &S);
|
||||
if (status < B_OK) {
|
||||
printf("resolve symbol returned: %ld\n", status);
|
||||
return status;
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (type) {
|
||||
@ -91,6 +93,7 @@ relocate_rel(image_t *image, struct Elf32_Rel *rel, int rel_len)
|
||||
/*
|
||||
* rldelf.c requires this function to be implemented on a per-cpu basis
|
||||
*/
|
||||
|
||||
static bool
|
||||
relocate_image(image_t *image)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user