diff options
author | gallatin <gallatin@FreeBSD.org> | 1999-08-20 14:21:35 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 1999-08-20 14:21:35 +0000 |
commit | 1f974e3af129cf7bb0b44f4df153fb068f3123ca (patch) | |
tree | 89ccedc8264209a29e7f18d74bd87fe1e235e5e1 /sys/powerpc | |
parent | 732c3788e6a0ccbde759d4160e870f034eb4aa51 (diff) | |
download | FreeBSD-src-1f974e3af129cf7bb0b44f4df153fb068f3123ca.zip FreeBSD-src-1f974e3af129cf7bb0b44f4df153fb068f3123ca.tar.gz |
Fix a nasty kld bug where modules with objects of type GLOB_DAT which had
non-zero addends were being loaded incorrectly
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/powerpc/elf_machdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/powerpc/powerpc/elf_machdep.c b/sys/powerpc/powerpc/elf_machdep.c index 2c559a5..646e353 100644 --- a/sys/powerpc/powerpc/elf_machdep.c +++ b/sys/powerpc/powerpc/elf_machdep.c @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: elf_machdep.c,v 1.4 1999/04/23 19:53:37 dt Exp $ + * $Id: elf_machdep.c,v 1.5 1999/07/16 09:16:11 dfr Exp $ */ #include <sys/param.h> @@ -85,6 +85,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym) linker_file_lookup_symbol(lf, sym, 1); if (addr == NULL) return -1; + addr += addend; if (*where != addr) *where = addr; break; |