diff options
author | Alan Modra <amodra@gmail.com> | 2009-05-12 09:07:37 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-05-12 09:07:37 +0000 |
commit | 78e82dc3f166e9c5bcea5440ddd49e846c3dcc04 (patch) | |
tree | 00cf36ebdc7d048ed6ad3281fa205a37039812aa /binutils | |
parent | 2d90c72afecf3529ed5e08ed3d53e66aff4cb06a (diff) | |
download | gdb-78e82dc3f166e9c5bcea5440ddd49e846c3dcc04.zip gdb-78e82dc3f166e9c5bcea5440ddd49e846c3dcc04.tar.gz gdb-78e82dc3f166e9c5bcea5440ddd49e846c3dcc04.tar.bz2 |
* objcopy.c (set_long_section_mode): Check input_bfd is coff
before accessing coff specific fields of bfd.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/objcopy.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d9c672a..c5c36bb 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2009-05-12 Alan Modra <amodra@bigpond.net.au> + + * objcopy.c (set_long_section_mode): Check input_bfd is coff + before accessing coff specific fields of bfd. + 2009-05-09 Dave Korn <dave.korn.cygwin@gmail.com> * MAINTAINERS: Add myself as PE/COFF co-maintainer. diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 7ef95c5..83d9e1b 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -2143,7 +2143,8 @@ set_long_section_mode (bfd *output_bfd, bfd *input_bfd, enum long_section_name_h /* This is only relevant to Coff targets. */ if (bfd_get_flavour (output_bfd) == bfd_target_coff_flavour) { - if (style == KEEP) + if (style == KEEP + && bfd_get_flavour (input_bfd) == bfd_target_coff_flavour) style = bfd_coff_long_section_names (input_bfd) ? ENABLE : DISABLE; bfd_coff_set_long_section_names (output_bfd, style != DISABLE); } |