Deleted Added
sdiff udiff text old ( 133133 ) new ( 137122 )
full compact
1/* $NetBSD: ppc_reloc.c,v 1.10 2001/09/10 06:09:41 mycroft Exp $ */
2
3/*-
4 * Copyright (C) 1998 Tsubai Masanari
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 12 unchanged lines hidden (view full) ---

21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * $FreeBSD: head/libexec/rtld-elf/powerpc/reloc.c 133133 2004-08-04 19:12:14Z dfr $
30 */
31
32#include <sys/param.h>
33#include <sys/mman.h>
34
35#include <errno.h>
36#include <stdio.h>
37#include <stdlib.h>

--- 163 unchanged lines hidden (view full) ---

201 break;
202
203 case R_PPC_JMP_SLOT:
204 /*
205 * These will be handled by the plt/jmpslot routines
206 */
207 break;
208
209 default:
210 _rtld_error("%s: Unsupported relocation type %d"
211 " in non-PLT relocations\n", obj->path,
212 ELF_R_TYPE(rela->r_info));
213 return (-1);
214 }
215 return (0);
216}

--- 272 unchanged lines hidden (view full) ---

489 */
490 __syncicache(pltcall, 72 + N * 8);
491}
492
493void
494allocate_initial_tls(Obj_Entry *list)
495{
496 register Elf_Addr **tp __asm__("r2");
497
498 /*
499 * Fix the size of the static TLS block by using the maximum
500 * offset allocated so far and adding a bit for dynamic modules to
501 * use.
502 */
503
504 tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA;
505
506 tp = (Elf_Addr **) ((char *) allocate_tls(list, 0, 8, 8) + 0x7008);
507}
508
509void*
510__tls_get_addr(tls_index* ti)
511{
512 register Elf_Addr **tp __asm__("r2");
513 char *p;
514
515 p = tls_get_addr_common(tp, ti->ti_module, ti->ti_offset);
516 return p + 0x8000;
517}