* Copyright 2003-2006, Axel DΓΆrfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include "runtime_loader_private.h"
#include <runtime_loader.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef TRACE_RLD
# define TRACE(x) dprintf x
#else
# define TRACE(x) ;
#endif
static int
relocate_rel(image_t *rootImage, image_t *image, Elf32_Rel *rel, int rel_len,
SymbolLookupCache* cache)
{
return B_NO_ERROR;
}
status_t
arch_relocate_image(image_t *rootImage, image_t *image,
SymbolLookupCache* cache)
{
status_t status = B_NO_ERROR;
if (image->rel) {
status = relocate_rel(rootImage, image, image->rel, image->rel_len,
cache);
if (status < B_OK)
return status;
}
if (image->pltrel) {
status = relocate_rel(rootImage, image, image->pltrel,
image->pltrel_len, cache);
if (status < B_OK)
return status;
}
if (image->rela) {
printf("RELA relocations not supported\n");
return EOPNOTSUPP;
}
return B_OK;
}