]> git.pld-linux.org Git - packages/elfutils.git/blob - elfutils-gcc34.patch
- minor fix for sparc.
[packages/elfutils.git] / elfutils-gcc34.patch
1 diff -uNr elfutils-0.94.orig/libdw/dwarf_getaranges.c elfutils-0.94/libdw/dwarf_getaranges.c
2 --- elfutils-0.94.orig/libdw/dwarf_getaranges.c 2004-01-12 21:08:03.000000000 +0100
3 +++ elfutils-0.94/libdw/dwarf_getaranges.c      2004-04-02 19:03:13.297222616 +0200
4 @@ -50,13 +50,13 @@
5    struct arangelist *arangelist = NULL;
6    unsigned int narangelist = 0;
7  
8 -  const char *readp
9 -    = (const char *) dbg->sectiondata[IDX_debug_aranges]->d_buf;
10 -  const char *readendp = readp + dbg->sectiondata[IDX_debug_aranges]->d_size;
11 +  unsigned char *readp
12 +    = (unsigned char *) dbg->sectiondata[IDX_debug_aranges]->d_buf;
13 +  const unsigned char *readendp = readp + dbg->sectiondata[IDX_debug_aranges]->d_size;
14  
15    while (readp < readendp)
16      {
17 -      const char *hdrstart = readp;
18 +      const unsigned char *hdrstart = readp;
19  
20        /* Each entry starts with a header:
21  
22 @@ -75,15 +75,15 @@
23  
24          5. A 1-byte unsigned integer containing the size in bytes of
25          a segment descriptor on the target system.  */
26 -      Dwarf_Word length = read_4ubyte_unaligned_inc (dbg, readp);
27 +      Dwarf_Word length = read_4ubyte_unaligned_inc (dbg, &readp);
28        unsigned int length_bytes = 4;
29        if (length == 0xffffffff)
30         {
31 -         length = read_8ubyte_unaligned_inc (dbg, readp);
32 +         length = read_8ubyte_unaligned_inc (dbg, &readp);
33           length_bytes = 8;
34         }
35  
36 -      unsigned int version = read_2ubyte_unaligned_inc (dbg, readp);
37 +      unsigned int version = read_2ubyte_unaligned_inc (dbg, &readp);
38        if (version != 2)
39         {
40         invalid:
41 @@ -93,9 +93,9 @@
42  
43        Dwarf_Word offset;
44        if (length_bytes == 4)
45 -       offset = read_4ubyte_unaligned_inc (dbg, readp);
46 +       offset = read_4ubyte_unaligned_inc (dbg, &readp);
47        else
48 -       offset = read_8ubyte_unaligned_inc (dbg, readp);
49 +       offset = read_8ubyte_unaligned_inc (dbg, &readp);
50  
51        unsigned int address_size = *readp++;
52        if (address_size != 4 && address_size != 8)
53 @@ -118,13 +118,13 @@
54  
55           if (address_size == 4)
56             {
57 -             range_address = read_4ubyte_unaligned_inc (dbg, readp);
58 -             range_length = read_4ubyte_unaligned_inc (dbg, readp);
59 +             range_address = read_4ubyte_unaligned_inc (dbg, &readp);
60 +             range_length = read_4ubyte_unaligned_inc (dbg, &readp);
61             }
62           else
63             {
64 -             range_address = read_8ubyte_unaligned_inc (dbg, readp);
65 -             range_length = read_8ubyte_unaligned_inc (dbg, readp);
66 +             range_address = read_8ubyte_unaligned_inc (dbg, &readp);
67 +             range_length = read_8ubyte_unaligned_inc (dbg, &readp);
68             }
69  
70           /* Two zero values mark the end.  */
71 diff -uNr elfutils-0.94.orig/libdw/dwarf_getloclist.c elfutils-0.94/libdw/dwarf_getloclist.c
72 --- elfutils-0.94.orig/libdw/dwarf_getloclist.c 2004-01-09 09:39:54.000000000 +0100
73 +++ elfutils-0.94/libdw/dwarf_getloclist.c      2004-04-02 19:03:32.961233232 +0200
74 @@ -117,14 +117,14 @@
75                   return -1;
76                 }
77  
78 -             newloc->number = read_4ubyte_unaligned_inc (dbg, data);
79 +             newloc->number = read_4ubyte_unaligned_inc (dbg, &data);
80             }
81           else
82             {
83               if (unlikely (data + 8 > end_data))
84                 goto invalid;
85  
86 -             newloc->number = read_8ubyte_unaligned_inc (dbg, data);
87 +             newloc->number = read_8ubyte_unaligned_inc (dbg, &data);
88             }
89           break;
90  
91 @@ -177,14 +177,14 @@
92           if (unlikely (data >= end_data))
93             goto invalid;
94  
95 -         newloc->number = *((int8_t *) data)++;
96 +         newloc->number = *(int8_t *)data++;
97           break;
98  
99         case DW_OP_const2u:
100           if (unlikely (data + 2 > end_data))
101             goto invalid;
102  
103 -         newloc->number = read_2ubyte_unaligned_inc (dbg, data);
104 +         newloc->number = read_2ubyte_unaligned_inc (dbg, &data);
105           break;
106  
107         case DW_OP_const2s:
108 @@ -194,14 +194,14 @@
109           if (unlikely (data + 2 > end_data))
110             goto invalid;
111  
112 -         newloc->number = read_2sbyte_unaligned_inc (dbg, data);
113 +         newloc->number = read_2sbyte_unaligned_inc (dbg, &data);
114           break;
115  
116         case DW_OP_const4u:
117           if (unlikely (data + 4 > end_data))
118             goto invalid;
119  
120 -         newloc->number = read_4ubyte_unaligned_inc (dbg, data);
121 +         newloc->number = read_4ubyte_unaligned_inc (dbg, &data);
122           break;
123  
124         case DW_OP_const4s:
125 @@ -209,21 +209,21 @@
126           if (unlikely (data + 4 > end_data))
127             goto invalid;
128  
129 -         newloc->number = read_4sbyte_unaligned_inc (dbg, data);
130 +         newloc->number = read_4sbyte_unaligned_inc (dbg, &data);
131           break;
132  
133         case DW_OP_const8u:
134           if (unlikely (data + 8 > end_data))
135             goto invalid;
136  
137 -         newloc->number = read_8ubyte_unaligned_inc (dbg, data);
138 +         newloc->number = read_8ubyte_unaligned_inc (dbg, &data);
139           break;
140  
141         case DW_OP_const8s:
142           if (unlikely (data + 8 > end_data))
143             goto invalid;
144  
145 -         newloc->number = read_8sbyte_unaligned_inc (dbg, data);
146 +         newloc->number = read_8sbyte_unaligned_inc (dbg, &data);
147           break;
148  
149         case DW_OP_constu:
150 diff -uNr elfutils-0.94.orig/libdw/dwarf_getpubnames.c elfutils-0.94/libdw/dwarf_getpubnames.c
151 --- elfutils-0.94.orig/libdw/dwarf_getpubnames.c        2004-01-16 09:34:11.000000000 +0100
152 +++ elfutils-0.94/libdw/dwarf_getpubnames.c     2004-04-02 19:03:13.299222312 +0200
153 @@ -56,10 +56,10 @@
154  
155        /* Read the set header.  */
156        int len_bytes = 4;
157 -      Dwarf_Off len = read_4ubyte_unaligned_inc (dbg, readp);
158 +      Dwarf_Off len = read_4ubyte_unaligned_inc (dbg, &readp);
159        if (len == 0xffffffff)
160         {
161 -         len = read_8ubyte_unaligned_inc (dbg, readp);
162 +         len = read_8ubyte_unaligned_inc (dbg, &readp);
163           len_bytes = 8;
164         }
165  
166 @@ -169,9 +169,9 @@
167         {
168           /* READP points to the next offset/name pair.  */
169           if (dbg->pubnames_sets[cnt].address_len == 4)
170 -           gl.die_offset = read_4ubyte_unaligned_inc (dbg, readp);
171 +           gl.die_offset = read_4ubyte_unaligned_inc (dbg, &readp);
172           else
173 -           gl.die_offset = read_8ubyte_unaligned_inc (dbg, readp);
174 +           gl.die_offset = read_8ubyte_unaligned_inc (dbg, &readp);
175  
176           /* If the offset is zero we reached the end of the set.  */
177           if (gl.die_offset == 0)
178 diff -uNr elfutils-0.94.orig/libdw/dwarf_getsrclines.c elfutils-0.94/libdw/dwarf_getsrclines.c
179 --- elfutils-0.94.orig/libdw/dwarf_getsrclines.c        2004-01-12 01:30:17.000000000 +0100
180 +++ elfutils-0.94/libdw/dwarf_getsrclines.c     2004-04-02 19:03:31.124512456 +0200
181 @@ -109,13 +109,13 @@
182           __libdw_seterrno (DWARF_E_INVALID_DEBUG_LINE);
183           goto out;
184         }
185 -      Dwarf_Word unit_length = read_4ubyte_unaligned_inc (dbg, linep);
186 +      Dwarf_Word unit_length = read_4ubyte_unaligned_inc (dbg, &linep);
187        unsigned int length = 4;
188        if (unlikely (unit_length == 0xffffffff))
189         {
190           if (linep + 8 > lineendp)
191             goto invalid_data;
192 -         unit_length = read_8ubyte_unaligned_inc (dbg, linep);
193 +         unit_length = read_8ubyte_unaligned_inc (dbg, &linep);
194           length = 8;
195         }
196  
197 @@ -126,7 +126,7 @@
198        lineendp = linep + unit_length;
199  
200        /* The next element of the header is the version identifier.  */
201 -      uint_fast16_t version = read_2ubyte_unaligned_inc (dbg, linep);
202 +      uint_fast16_t version = read_2ubyte_unaligned_inc (dbg, &linep);
203        if (unlikely (version != DWARF_VERSION))
204         {
205           __libdw_seterrno (DWARF_E_VERSION);
206 @@ -136,9 +136,9 @@
207        /* Next comes the header length.  */
208        Dwarf_Word header_length;
209        if (length == 4)
210 -       header_length = read_4ubyte_unaligned_inc (dbg, linep);
211 +       header_length = read_4ubyte_unaligned_inc (dbg, &linep);
212        else
213 -       header_length = read_8ubyte_unaligned_inc (dbg, linep);
214 +       header_length = read_8ubyte_unaligned_inc (dbg, &linep);
215        unsigned char *header_start = linep;
216  
217        /* Next the minimum instruction length.  */
218 @@ -149,7 +149,7 @@
219        uint_fast8_t default_is_stmt = *linep++;
220  
221        /* Now the line base.  */
222 -      int_fast8_t line_base = *((int_fast8_t *) linep)++;
223 +      int_fast8_t line_base = *(int_fast8_t *)linep++;
224  
225        /* And the line range.  */
226        uint_fast8_t line_range = *linep++;
227 @@ -376,9 +376,9 @@
228  
229                 case DW_LNE_set_address:
230                   if (cu->address_size == 4)
231 -                   address = read_4ubyte_unaligned_inc (dbg, linep);
232 +                   address = read_4ubyte_unaligned_inc (dbg, &linep);
233                   else
234 -                   address = read_8ubyte_unaligned_inc (dbg, linep);
235 +                   address = read_8ubyte_unaligned_inc (dbg, &linep);
236                   break;
237  
238                 case DW_LNE_define_file:
239 diff -uNr elfutils-0.94.orig/libdw/dwarf_nextcu.c elfutils-0.94/libdw/dwarf_nextcu.c
240 --- elfutils-0.94.orig/libdw/dwarf_nextcu.c     2004-01-10 04:43:17.000000000 +0100
241 +++ elfutils-0.94/libdw/dwarf_nextcu.c  2004-04-02 19:03:13.305221400 +0200
242 @@ -47,7 +47,7 @@
243  
244    /* This points into the .debug_info section to the beginning of the
245       CU entry.  */
246 -  char *bytes = (char *) dwarf->sectiondata[IDX_debug_info]->d_buf + off;
247 +  unsigned char *bytes = (char *) dwarf->sectiondata[IDX_debug_info]->d_buf + off;
248  
249    /* The format of the CU header is described in dwarf2p1 7.5.1:
250  
251 @@ -74,7 +74,7 @@
252          an address on the target architecture. If the system uses
253          segmented addressing, this value represents the size of the
254          offset portion of an address.  */
255 -  uint64_t length = read_4ubyte_unaligned_inc (dwarf, bytes);
256 +  uint64_t length = read_4ubyte_unaligned_inc (dwarf, &bytes);
257    size_t offset_size = 4;
258    if (length == 0xffffffffu)
259      offset_size = 8;
260 @@ -93,19 +93,19 @@
261  
262    if (length == 0xffffffffu)
263      /* This is a 64-bit DWARF format.  */
264 -    length = read_8ubyte_unaligned_inc (dwarf, bytes);
265 +    length = read_8ubyte_unaligned_inc (dwarf, &bytes);
266  
267    /* Read the version stamp.  Always a 16-bit value.
268       XXX Do we need the value?  */
269 -  read_2ubyte_unaligned_inc (dwarf, bytes);
270 +  read_2ubyte_unaligned_inc (dwarf, &bytes);
271  
272    /* Get offset in .debug_abbrev.  Note that the size of the entry
273       depends on whether this is a 32-bit or 64-bit DWARF definition.  */
274    uint64_t abbrev_offset;
275    if (offset_size == 4)
276 -    abbrev_offset = read_4ubyte_unaligned_inc (dwarf, bytes);
277 +    abbrev_offset = read_4ubyte_unaligned_inc (dwarf, &bytes);
278    else
279 -    abbrev_offset = read_8ubyte_unaligned_inc (dwarf, bytes);
280 +    abbrev_offset = read_8ubyte_unaligned_inc (dwarf, &bytes);
281    if (abbrev_offsetp != NULL)
282      *abbrev_offsetp = abbrev_offset;
283  
284 @@ -121,7 +121,7 @@
285    /* Store the header length.  */
286    if (header_sizep != NULL)
287      *header_sizep = (bytes
288 -                    - ((char *) dwarf->sectiondata[IDX_debug_info]->d_buf
289 +                    - ((unsigned char *)dwarf->sectiondata[IDX_debug_info]->d_buf
290                         + off));
291  
292    /* See above for an explanation of the trick in this formula.  */
293 diff -uNr elfutils-0.94.orig/libdw/memory-access.h elfutils-0.94/libdw/memory-access.h
294 --- elfutils-0.94.orig/libdw/memory-access.h    2004-01-16 18:43:30.000000000 +0100
295 +++ elfutils-0.94/libdw/memory-access.h 2004-04-02 19:03:22.820774816 +0200
296 @@ -23,19 +23,19 @@
297  /* Number decoding macros.  See 7.6 Variable Length Data.  */
298  #define get_uleb128(var, addr) \
299    do {                                                                       \
300 -    unsigned char __b = *((const unsigned char *) addr)++;                   \
301 +    unsigned char __b = *(const unsigned char *)addr++;                              \
302      var = __b & 0x7f;                                                        \
303      if (__b & 0x80)                                                          \
304        {                                                                              \
305 -       __b = *((const unsigned char *) addr)++;                              \
306 +       __b = *(const unsigned char *)addr++;                                 \
307         var |= (__b & 0x7f) << 7;                                             \
308         if (__b & 0x80)                                                       \
309           {                                                                   \
310 -           __b = *((const unsigned char *) addr)++;                          \
311 +           __b = *(const unsigned char *)addr++;                             \
312             var |= (__b & 0x7f) << 14;                                        \
313             if (__b & 0x80)                                                   \
314               {                                                               \
315 -               __b = *((const unsigned char *) addr)++;                      \
316 +               __b = *(const unsigned char *)addr++;                         \
317                 var |= (__b & 0x7f) << 21;                                    \
318                 if (__b & 0x80)                                               \
319                   /* Other implementation set VALUE to UINT_MAX in this       \
320 @@ -49,7 +49,7 @@
321  /* The signed case is a big more complicated.  */
322  #define get_sleb128(var, addr) \
323    do {                                                                       \
324 -    unsigned char __b = *((const unsigned char *) addr)++;                   \
325 +    unsigned char __b = *(const unsigned char *)addr++;                              \
326      int32_t __res = __b & 0x7f;                                                      \
327      if ((__b & 0x80) == 0)                                                   \
328        {                                                                              \
329 @@ -58,7 +58,7 @@
330        }                                                                              \
331      else                                                                     \
332        {                                                                              \
333 -       __b = *((const unsigned char *) addr)++;                              \
334 +       __b = *(const unsigned char *)addr++;                                 \
335         __res |= (__b & 0x7f) << 7;                                           \
336         if ((__b & 0x80) == 0)                                                \
337           {                                                                   \
338 @@ -67,7 +67,7 @@
339           }                                                                   \
340         else                                                                  \
341           {                                                                   \
342 -           __b = *((const unsigned char *) addr)++;                          \
343 +           __b = *(const unsigned char *)addr++;                             \
344             __res |= (__b & 0x7f) << 14;                                      \
345             if ((__b & 0x80) == 0)                                            \
346               {                                                               \
347 @@ -76,7 +76,7 @@
348               }                                                               \
349             else                                                              \
350               {                                                               \
351 -               __b = *((const unsigned char *) addr)++;                      \
352 +               __b = *(const unsigned char *)addr++;                         \
353                 __res |= (__b & 0x7f) << 21;                                  \
354                 if ((__b & 0x80) == 0)                                        \
355                   {                                                           \
356 @@ -200,31 +200,43 @@
357  #endif /* allow unaligned */
358  
359  
360 -#define read_2ubyte_unaligned_inc(Dbg, Addr) \
361 -  ({ uint16_t t_ = read_2ubyte_unaligned (Dbg, Addr);                        \
362 -     ++((const uint16_t *) (Addr));                                          \
363 -     t_; })
364 -#define read_2sbyte_unaligned_inc(Dbg, Addr) \
365 -  ({ int16_t t_ = read_2sbyte_unaligned (Dbg, Addr);                         \
366 -     ++((const int16_t *) (Addr));                                           \
367 -     t_; })
368 -
369 -#define read_4ubyte_unaligned_inc(Dbg, Addr) \
370 -  ({ uint32_t t_ = read_4ubyte_unaligned (Dbg, Addr);                        \
371 -     ++((const uint32_t *) (Addr));                                          \
372 -     t_; })
373 -#define read_4sbyte_unaligned_inc(Dbg, Addr) \
374 -  ({ int32_t t_ = read_4sbyte_unaligned (Dbg, Addr);                         \
375 -     ++((const int32_t *) (Addr));                                           \
376 -     t_; })
377 -
378 -#define read_8ubyte_unaligned_inc(Dbg, Addr) \
379 -  ({ uint64_t t_ = read_8ubyte_unaligned (Dbg, Addr);                        \
380 -     ++((const uint64_t *) (Addr));                                          \
381 -     t_; })
382 -#define read_8sbyte_unaligned_inc(Dbg, Addr) \
383 -  ({ int64_t t_ = read_8sbyte_unaligned (Dbg, Addr);                         \
384 -     ++((const int64_t *) (Addr));                                           \
385 -     t_; })
386 +static inline uint16_t read_2ubyte_unaligned_inc(Dwarf *dbg, unsigned char **p)
387 +{
388 +    uint16_t tmp = read_2ubyte_unaligned(dbg, *p);
389 +    *p += 2;
390 +    return tmp;
391 +}
392 +static inline int16_t read_2sbyte_unaligned_inc(Dwarf *dbg, unsigned char **p)
393 +{
394 +    int16_t tmp = read_2sbyte_unaligned(dbg, *p);
395 +    *p += 2;
396 +    return tmp;
397 +}
398 +
399 +static inline uint32_t read_4ubyte_unaligned_inc(Dwarf *dbg, unsigned char **p)
400 +{
401 +    uint32_t tmp = read_4ubyte_unaligned(dbg, *p);
402 +    *p += 4;
403 +    return tmp;
404 +}
405 +static inline int32_t read_4sbyte_unaligned_inc(Dwarf *dbg, unsigned char **p)
406 +{
407 +    int32_t tmp = read_4sbyte_unaligned(dbg, *p);
408 +    *p += 4;
409 +    return tmp;
410 +}
411 +
412 +static inline uint64_t read_8ubyte_unaligned_inc(Dwarf *dbg, unsigned char **p)
413 +{
414 +    uint64_t tmp = read_8ubyte_unaligned(dbg, *p);
415 +    *p += 8;
416 +    return tmp;
417 +}
418 +static inline int64_t read_8sbyte_unaligned_inc(Dwarf *dbg, unsigned char **p)
419 +{
420 +    int64_t tmp = read_8sbyte_unaligned(dbg, *p);
421 +    *p += 8;
422 +    return tmp;
423 +}
424  
425  #endif /* memory-access.h */
426 diff -uNr elfutils-0.94.orig/libelf/dl-hash.h elfutils-0.94/libelf/dl-hash.h
427 --- elfutils-0.94.orig/libelf/dl-hash.h 2003-12-25 19:31:59.000000000 +0100
428 +++ elfutils-0.94/libelf/dl-hash.h      2004-04-02 19:03:13.296222768 +0200
429 @@ -26,28 +26,28 @@
430  __attribute__ ((__pure__))
431  _dl_elf_hash (const char *name)
432  {
433 -  unsigned int hash = (unsigned int) *((const unsigned char *) name)++;
434 +  unsigned int hash = (unsigned int) *(const unsigned char *)name++;
435    if (*name != '\0')
436      {
437        hash = ((hash << 4)
438 -             + (unsigned int) *((const unsigned char *) name)++);
439 +             + (unsigned int) *(const unsigned char *)name++);
440        if (*name != '\0')
441         {
442           hash = ((hash << 4)
443 -                 + (unsigned int) *((const unsigned char *) name)++);
444 +                 + (unsigned int) *(const unsigned char *)name++);
445           if (*name != '\0')
446             {
447               hash = ((hash << 4)
448 -                     + (unsigned int) *((const unsigned char *) name)++);
449 +                     + (unsigned int) *(const unsigned char *)name++);
450               if (*name != '\0')
451                 {
452                   hash = ((hash << 4)
453 -                         + (unsigned int) *((const unsigned char *) name)++);
454 +                         + (unsigned int) *(const unsigned char *)name++);
455                   while (*name != '\0')
456                     {
457                       unsigned int hi;
458                       hash = ((hash << 4)
459 -                             + (unsigned int) *((const unsigned char *) name)++);
460 +                             + (unsigned int) *(const unsigned char *)name++);
461                       hi = hash & 0xf0000000;
462  
463                       /* The algorithm specified in the ELF ABI is as
464 diff -uNr elfutils-0.94.orig/libelf/gelf_xlate.c elfutils-0.94/libelf/gelf_xlate.c
465 --- elfutils-0.94.orig/libelf/gelf_xlate.c      2003-12-25 19:42:38.000000000 +0100
466 +++ elfutils-0.94/libelf/gelf_xlate.c   2004-04-02 19:03:28.501911152 +0200
467 @@ -73,9 +73,10 @@
468      if (dest < ptr)                                                          \
469        while (n-- > 0)                                                        \
470         {                                                                     \
471 -          *((word##Bytes##_t *) dest)++ =                                    \
472 +          *((word##Bytes##_t *)dest) =                                       \
473             LEN##Bytes##_SWAP ((word##Bytes##_t *) ptr);                      \
474 -         ((word##Bytes##_t *) ptr)++;                                        \
475 +         dest += sizeof(word##Bytes##_t *);                                  \
476 +         ptr += sizeof(word##Bytes##_t *);                                   \
477         }                                                                     \
478      else                                                                     \
479        {                                                                              \
480 diff -uNr elfutils-0.94.orig/src/ldgeneric.c elfutils-0.94/src/ldgeneric.c
481 --- elfutils-0.94.orig/src/ldgeneric.c  2003-08-18 01:49:51.000000000 +0200
482 +++ elfutils-0.94/src/ldgeneric.c       2004-04-02 19:03:35.409860984 +0200
483 @@ -2449,9 +2449,8 @@
484      ld_state.outfname = "a.out";
485  
486    size_t outfname_len = strlen (ld_state.outfname);
487 -  char *tempfname = (char *) ld_state.tempfname
488 -    = (char *) obstack_alloc (&ld_state.smem,
489 -                             outfname_len + sizeof (".XXXXXX"));
490 +  char *tempfname = ld_state.tempfname
491 +    = obstack_alloc (&ld_state.smem, outfname_len + sizeof (".XXXXXX"));
492  
493    int fd;
494    int try = 0;
495 diff -uNr elfutils-0.94.orig/src/ld.h elfutils-0.94/src/ld.h
496 --- elfutils-0.94.orig/src/ld.h 2003-08-12 08:46:39.000000000 +0200
497 +++ elfutils-0.94/src/ld.h      2004-04-02 19:03:35.412860528 +0200
498 @@ -752,7 +752,7 @@
499    /* Name of the output file.  */
500    const char *outfname;
501    /* Name of the temporary file we initially create.  */
502 -  const char *tempfname;
503 +  char *tempfname;
504    /* File descriptor opened for the output file.  */
505    int outfd;
506    /* The ELF descriptor for the output file.  */
507 diff -uNr elfutils-0.94.orig/src/readelf.c elfutils-0.94/src/readelf.c
508 --- elfutils-0.94.orig/src/readelf.c    2004-01-16 10:29:37.000000000 +0100
509 +++ elfutils-0.94/src/readelf.c 2004-04-02 19:03:35.418859616 +0200
510 @@ -2974,7 +2974,7 @@
511    Dwarf_Word offset = 0;
512    while (len-- > 0)
513      {
514 -      size_t op = *((unsigned char *) data)++;
515 +      size_t op = *(unsigned char *)data++;
516  
517        switch (op)
518         {
519 @@ -3004,7 +3004,7 @@
520         case DW_OP_const1u:
521           printf ("           %*s [%4" PRIuMAX "] %s %" PRIu8 "\n",
522                   (int) (20 + level * 2), "", (uintmax_t) offset,
523 -                 known[op] ?: "???", *((uint8_t *) data)++);
524 +                 known[op] ?: "???", *(uint8_t *)data++);
525           --len;
526           offset += 2;
527           break;
528 @@ -3039,7 +3039,7 @@
529         case DW_OP_const1s:
530           printf ("           %*s [%4" PRIuMAX "] %s %" PRId8 "\n",
531                   (int) (20 + level * 2), "", (uintmax_t) offset,
532 -                 known[op] ?: "???", *((int8_t *) data)++);
533 +                 known[op] ?: "???", *(int8_t *)data++);
534           --len;
535           offset += 2;
536           break;
537 @@ -3090,7 +3090,7 @@
538         case DW_OP_consts:;
539           start = data;
540           unsigned int sleb;
541 -         get_sleb128 (sleb, ((unsigned char *) data));
542 +         get_sleb128 (sleb, (unsigned char *)data);
543           printf ("           %*s [%4" PRIuMAX "] %s %d\n",
544                   (int) (20 + level * 2), "", (uintmax_t) offset,
545                   known[op] ?: "???", sleb);
546 @@ -3100,8 +3100,8 @@
547  
548         case DW_OP_bregx:
549           start = data;
550 -         get_uleb128 (uleb, ((unsigned char *) data));
551 -         get_sleb128 (sleb, ((unsigned char *) data));
552 +         get_uleb128 (uleb, (unsigned char *)data);
553 +         get_sleb128 (sleb, (unsigned char *)data);
554           printf ("           %*s [%4" PRIuMAX "] %s %u %d\n",
555                   (int) (20 + level * 2), "", (uintmax_t) offset,
556                   known[op] ?: "???", uleb, sleb);
This page took 0.133956 seconds and 3 git commands to generate.