diff options
author | Alan Modra <amodra@gmail.com> | 2000-01-26 23:11:48 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-01-26 23:11:48 +0000 |
commit | 305c72062b487da283913b9f4b3016b0546c64a3 (patch) | |
tree | a298d4281e21b134459e5f9d5ce964bb95469bc7 /binutils | |
parent | 4c63da97a708e211a7141e29082ab589cbdbcb12 (diff) | |
download | gdb-305c72062b487da283913b9f4b3016b0546c64a3.zip gdb-305c72062b487da283913b9f4b3016b0546c64a3.tar.gz gdb-305c72062b487da283913b9f4b3016b0546c64a3.tar.bz2 |
Most of these changes are really only cosmetic. The readelf.c patch
fixes a thinko in get_dynamic_flags. I found at least one message
string that included a `%' being passed to printf in the format
argument.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 10 | ||||
-rw-r--r-- | binutils/readelf.c | 19 |
2 files changed, 21 insertions, 8 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d33638b..45b7a22 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,13 @@ +2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au> + + * readelf.c (get_dynamic_flags): Return buff. + (process_dynamic_segment): Don't pass error strings to printf + as format arg. + (read_and_display_attr): Use lx and ld to print longs. + (process_corefile_note_segment): Cast bfd_vma to unsigned long + before printing. + Update copyright. + 2000-01-17 Nick Clifton <nickc@cygnus.com> * readelf.c (get_osabi_name): Recognise ELFOSABI_ARM. diff --git a/binutils/readelf.c b/binutils/readelf.c index aefdd22..438d5cc 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -1,5 +1,5 @@ /* readelf.c -- display contents of an ELF format file - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc. Originally developed by Eric Youngdale <eric@andante.jic.com> Modifications by Nick Clifton <nickc@cygnus.com> @@ -2999,9 +2999,10 @@ get_dynamic_flags (flags) case DF_SYMBOLIC: strcat (buff, "SYMBOLIC "); break; case DF_TEXTREL: strcat (buff, "TEXTREL "); break; case DF_BIND_NOW: strcat (buff, "BIND_NOW "); break; - default: strcat (buff, "unknown "); return; + default: strcat (buff, "unknown "); break; } } + return buff; } /* Parse and display the contents of the dynamic segment. */ @@ -3178,7 +3179,7 @@ process_dynamic_segment (file) { case DT_FLAGS: if (do_dynamic) - printf (get_dynamic_flags (entry->d_un.d_val)); + printf ("%s", get_dynamic_flags (entry->d_un.d_val)); break; case DT_AUXILIARY: @@ -5965,7 +5966,7 @@ read_and_display_attr (attribute, form, data, pointer_size) case DW_FORM_ref_addr: case DW_FORM_addr: uvalue = byte_get (data, pointer_size); - printf (is_ref ? " <%x>" : " %#x", uvalue); + printf (is_ref ? " <%lx>" : " %#lx", uvalue); data += pointer_size; break; @@ -5973,21 +5974,21 @@ read_and_display_attr (attribute, form, data, pointer_size) case DW_FORM_flag: case DW_FORM_data1: uvalue = byte_get (data ++, 1); - printf (is_ref ? " <%x>" : " %d", uvalue); + printf (is_ref ? " <%lx>" : " %ld", uvalue); break; case DW_FORM_ref2: case DW_FORM_data2: uvalue = byte_get (data, 2); data += 2; - printf (is_ref ? " <%x>" : " %d", uvalue); + printf (is_ref ? " <%lx>" : " %ld", uvalue); break; case DW_FORM_ref4: case DW_FORM_data4: uvalue = byte_get (data, 4); data += 4; - printf (is_ref ? " <%x>" : " %d", uvalue); + printf (is_ref ? " <%lx>" : " %ld", uvalue); break; case DW_FORM_ref8: @@ -6981,7 +6982,9 @@ process_corefile_note_segment (file, offset, length) external = pnotes; - printf (_("\nNotes at offset 0x%08lx with length 0x%08lx:\n"), offset, length); + printf (_("\nNotes at offset 0x%08lx with length 0x%08lx:\n"), + (unsigned long) offset, + (unsigned long) length); printf (_(" Owner\t\tData size\tDescription\n")); while (external < (Elf_External_Note *)((char *) pnotes + length)) |