aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-eh-frame.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-01-25 06:24:34 +0000
committerAlan Modra <amodra@gmail.com>2002-01-25 06:24:34 +0000
commitc68836a9c07fe3bb11256a080fff889743a89aa1 (patch)
tree47f9b835d20652a1513af38533bb9c5f6a198ca3 /bfd/elf-eh-frame.c
parentc895725ba0442c5fb18e94f4516f474a4f12e9ab (diff)
downloadfsf-binutils-gdb-c68836a9c07fe3bb11256a080fff889743a89aa1.zip
fsf-binutils-gdb-c68836a9c07fe3bb11256a080fff889743a89aa1.tar.gz
fsf-binutils-gdb-c68836a9c07fe3bb11256a080fff889743a89aa1.tar.bz2
* elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
unsigned overflow when new_offset < old_offset.
Diffstat (limited to 'bfd/elf-eh-frame.c')
-rw-r--r--bfd/elf-eh-frame.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 56a59da..b479c00 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -1,5 +1,5 @@
/* .eh_frame section optimization.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -867,8 +867,8 @@ _bfd_elf_eh_frame_section_offset (output_bfd, sec, offset)
+ sec_info->entry[mid].lsda_offset)))
return (bfd_vma) -1;
- return (offset
- + (sec_info->entry[mid].new_offset - sec_info->entry[mid].offset));
+ return (offset + sec_info->entry[mid].new_offset
+ - sec_info->entry[mid].offset);
}
/* Write out .eh_frame section. This is called with the relocated