3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
6 --- glibc-2.2.5/sysdeps/m68k/dl-machine.h~dl-machine-m68k.patch 2004-09-03 19:00:33.000000000 -0500
7 +++ glibc-2.2.5/sysdeps/m68k/dl-machine.h 2004-09-03 19:00:37.000000000 -0500
9 /* Machine-dependent ELF dynamic relocation inline functions. m68k version.
10 - Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
11 + Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
12 This file is part of the GNU C Library.
14 The GNU C Library is free software; you can redistribute it and/or
17 got[2] = (Elf32_Addr) &_dl_runtime_profile;
19 - if (_dl_name_match_p (_dl_profile, l))
20 + if (_dl_name_match_p (GL(dl_profile), l))
22 /* This is the object we are looking for. Say that we really
23 want profiling and the timers are started. */
24 - _dl_profile_map = l;
25 + GL(dl_profile_map) = l;
30 /* This code is used in dl-runtime.c to call the `fixup' function
31 and then redirect to the address it returns. */
32 #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
33 -"| Trampoline for " #fixup_name "
34 - .globl " #tramp_name "
35 - .type " #tramp_name ", @function
37 - | Save %a0 (struct return address) and %a1.
40 - | Call the real address resolver.
41 - jbsr " #fixup_name "
42 - | Restore register %a0 and %a1.
47 - | Call real function.
49 +"| Trampoline for " #fixup_name "\n\
50 + .globl " #tramp_name "\n\
51 + .type " #tramp_name ", @function\n\
53 + | Save %a0 (struct return address) and %a1.\n\
54 + move.l %a0, -(%sp)\n\
55 + move.l %a1, -(%sp)\n\
56 + | Call the real address resolver.\n\
57 + jbsr " #fixup_name "\n\
58 + | Restore register %a0 and %a1.\n\
59 + move.l (%sp)+, %a1\n\
60 + move.l (%sp)+, %a0\n\
63 + | Call real function.\n\
65 .size " #tramp_name ", . - " #tramp_name "\n"
67 #define ELF_MACHINE_RUNTIME_TRAMPOLINE \
69 its return value is the user program's entry point. */
71 #define RTLD_START asm ("\
74 - .type _start,@function
81 - .globl _dl_start_user
82 - .type _dl_start_user,@function
84 - | Save the user entry point address in %a4.
86 - | Point %a5 at the GOT.
87 - lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5
88 - | Remember the highest stack address.
89 - move.l %sp, ([__libc_stack_end@GOT.w, %a5])
90 - | See if we were run as a command with the executable file
91 - | name as an extra leading argument.
92 - move.l ([_dl_skip_args@GOT.w, %a5]), %d0
93 - | Pop the original argument count
95 - | Subtract _dl_skip_args from it.
97 - | Adjust the stack pointer to skip _dl_skip_args words.
98 - lea (%sp, %d0*4), %sp
99 - | Push back the modified argument count.
101 - # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
105 - move.l ([_dl_loaded@GOT.w, %a5]), -(%sp)
106 - jbsr _dl_init@PLTPC
109 - | Pass our finalizer function to the user in %a1.
110 - move.l _dl_fini@GOT.w(%a5), %a1
111 - | Initialize %fp with the stack pointer.
113 - | Jump to the user's entry point.
115 - .size _dl_start_user, . - _dl_start_user
118 + .type _start,@function\n\
120 + move.l %sp, -(%sp)\n\
125 + .globl _dl_start_user\n\
126 + .type _dl_start_user,@function\n\
128 + | Save the user entry point address in %a4.\n\
130 + | Point %a5 at the GOT.\n\
131 + lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5\n\
132 + | Remember the highest stack address.\n\
133 + move.l %sp, ([__libc_stack_end@GOT.w, %a5])\n\
134 + | See if we were run as a command with the executable file\n\
135 + | name as an extra leading argument.\n\
136 + move.l ([_dl_skip_args@GOT.w, %a5]), %d0\n\
137 + | Pop the original argument count\n\
138 + move.l (%sp)+, %d1\n\
139 + | Subtract _dl_skip_args from it.\n\
141 + | Adjust the stack pointer to skip _dl_skip_args words.\n\
142 + lea (%sp, %d0*4), %sp\n\
143 + | Push back the modified argument count.\n\
144 + move.l %d1, -(%sp)\n\
145 + # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\
146 + pea 8(%sp, %d1*4)\n\
148 + move.l %d1, -(%sp)\n\
149 + move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\
150 + jbsr _dl_init@PLTPC\n\
153 + | Pass our finalizer function to the user in %a1.\n\
154 + move.l _dl_fini@GOT.w(%a5), %a1\n\
155 + | Initialize %fp with the stack pointer.\n\
157 + | Jump to the user's entry point.\n\
159 + .size _dl_start_user, . - _dl_start_user\n\
162 /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
166 if (sym->st_size > refsym->st_size
167 - || (sym->st_size < refsym->st_size && _dl_verbose))
168 + || (sym->st_size < refsym->st_size && GL(dl_verbose)))
170 extern char **_dl_argv;