diff options
Diffstat (limited to 'binutils-2.25/bfd/section.c')
-rw-r--r-- | binutils-2.25/bfd/section.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/binutils-2.25/bfd/section.c b/binutils-2.25/bfd/section.c index fb19d8cc..b27539ae 100644 --- a/binutils-2.25/bfd/section.c +++ b/binutils-2.25/bfd/section.c @@ -1,8 +1,5 @@ /* Object file "section" support for the BFD library. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012, 2013 - Free Software Foundation, Inc. + Copyright (C) 1990-2014 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -388,6 +385,7 @@ CODE_FRAGMENT .#define SEC_INFO_TYPE_MERGE 2 .#define SEC_INFO_TYPE_EH_FRAME 3 .#define SEC_INFO_TYPE_JUST_SYMS 4 +.#define SEC_INFO_TYPE_TARGET 5 . . {* Nonzero if this section uses RELA relocations, rather than REL. *} . unsigned int use_rela_p:1; @@ -542,6 +540,32 @@ CODE_FRAGMENT . int size; .}; . +.{* Note: the following are provided as inline functions rather than macros +. because not all callers use the return value. A macro implementation +. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some +. compilers will complain about comma expressions that have no effect. *} +.static inline bfd_boolean +.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) +.{ +. ptr->userdata = val; +. return TRUE; +.} +. +.static inline bfd_boolean +.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) +.{ +. ptr->vma = ptr->lma = val; +. ptr->user_set_vma = TRUE; +. return TRUE; +.} +. +.static inline bfd_boolean +.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) +.{ +. ptr->alignment_power = val; +. return TRUE; +.} +. .{* These sections are global, and are managed by BFD. The application . and target back end are not permitted to change the values in . these sections. *} |