Just cleanups, commented out unused code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2435 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
** Distributed under the terms of the NewOS License.
|
** Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static
|
|
||||||
int
|
static int
|
||||||
relocate_rel(image_t *image, struct Elf32_Rel *rel, int rel_len)
|
relocate_rel(image_t *image, struct Elf32_Rel *rel, int rel_len)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -84,48 +84,44 @@ relocate_rel(image_t *image, struct Elf32_Rel *rel, int rel_len )
|
|||||||
# undef A
|
# undef A
|
||||||
# undef B
|
# undef B
|
||||||
|
|
||||||
|
|
||||||
return B_NO_ERROR;
|
return B_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rldelf.c requires this function to be implemented on a per-cpu basis
|
* rldelf.c requires this function to be implemented on a per-cpu basis
|
||||||
*/
|
*/
|
||||||
static
|
static bool
|
||||||
bool
|
|
||||||
relocate_image(image_t *image)
|
relocate_image(image_t *image)
|
||||||
{
|
{
|
||||||
int res = B_NO_ERROR;
|
status_t status = B_NO_ERROR;
|
||||||
int i;
|
|
||||||
|
|
||||||
if(image->flags & RFLAG_RELOCATED) {
|
if (image->flags & RFLAG_RELOCATED)
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
image->flags |= RFLAG_RELOCATED;
|
image->flags |= RFLAG_RELOCATED;
|
||||||
|
|
||||||
// deal with the rels first
|
// deal with the rels first
|
||||||
if (image->rel) {
|
if (image->rel) {
|
||||||
res= relocate_rel( image, image->rel, image->rel_len );
|
status = relocate_rel(image, image->rel, image->rel_len);
|
||||||
|
if (status)
|
||||||
if(res) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (image->pltrel) {
|
if (image->pltrel) {
|
||||||
res= relocate_rel(image, image->pltrel, image->pltrel_len);
|
status = relocate_rel(image, image->pltrel, image->pltrel_len);
|
||||||
|
if (status)
|
||||||
if(res) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (image->rela) {
|
if (image->rela) {
|
||||||
|
//int i;
|
||||||
printf("RELA relocations not supported\n");
|
printf("RELA relocations not supported\n");
|
||||||
return ERR_NOT_ALLOWED;
|
return false;
|
||||||
for(i = 1; i * (int)sizeof(struct Elf32_Rela) < image->rela_len; i++) {
|
|
||||||
printf("rela: type %d\n", ELF32_R_TYPE(image->rela[i].r_info));
|
//for (i = 1; i * (int)sizeof(struct Elf32_Rela) < image->rela_len; i++) {
|
||||||
}
|
// printf("rela: type %d\n", ELF32_R_TYPE(image->rela[i].r_info));
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user