aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in2.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-04-11 04:08:13 +0000
committerAlan Modra <amodra@gmail.com>2011-04-11 04:08:13 +0000
commite57278ef9d811d78f6db04a11ea4810ca6ae2575 (patch)
tree5d4cef8d28e53b1531921e76c259b68618281c52 /bfd/bfd-in2.h
parent6edcf5b8e0d9b18f11019d87bf217924abbe3322 (diff)
downloadbinutils-e57278ef9d811d78f6db04a11ea4810ca6ae2575.zip
binutils-e57278ef9d811d78f6db04a11ea4810ca6ae2575.tar.gz
binutils-e57278ef9d811d78f6db04a11ea4810ca6ae2575.tar.bz2
* bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
sections. * libbfd.c (_bfd_generic_get_section_contents): Likewise. (_bfd_generic_get_section_contents_in_window): Likewise. * section.c (bfd_get_section_contents): Likewise. * compress.c (bfd_get_full_section_contents): Likewise. * elf32-rx.c (rx_final_link): Ignore rawsize. * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct bfd with bfd_get_section_limit. * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter. Use os->size during final link. Update callers. * bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r--bfd/bfd-in2.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index a1ef1c1..e7c410d 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -7,8 +7,8 @@
/* Main header file for the bfd library -- portable access to object files.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -298,8 +298,8 @@ typedef struct bfd_section *sec_ptr;
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
/* Find the address one past the end of SEC. */
#define bfd_get_section_limit(bfd, sec) \
- (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
- / bfd_octets_per_byte (bfd))
+ (((bfd)->direction != write_direction && (sec)->rawsize != 0 \
+ ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd))
/* Return TRUE if input section SEC has been discarded. */
#define elf_discarded_section(sec) \