aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-09-19 12:15:16 +0930
committerAlan Modra <amodra@gmail.com>2019-09-20 18:04:02 +0930
commitaf30dc128be191dc6179763203035ff62c634284 (patch)
tree6d6f843bbfa3b1ae57bd6c2913b347b429a1ff3f /bfd/bfd.c
parent00f93c449228e69f2161405b1f49b406e88785f0 (diff)
downloadgdb-af30dc128be191dc6179763203035ff62c634284.zip
gdb-af30dc128be191dc6179763203035ff62c634284.tar.gz
gdb-af30dc128be191dc6179763203035ff62c634284.tar.bz2
bfd macro conversion to inline functions, asymbol
* bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name), (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete. * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name), (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions. * targets.c (bfd_asymbol_flavour): Likewise. * bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index c11274c..9270e11 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -447,6 +447,36 @@ CODE_FRAGMENT
. abfd->usrdata = val;
.}
.
+.static inline asection *
+.bfd_asymbol_section (const asymbol *sy)
+.{
+. return sy->section;
+.}
+.
+.static inline bfd_vma
+.bfd_asymbol_value (const asymbol *sy)
+.{
+. return sy->section->vma + sy->value;
+.}
+.
+.static inline const char *
+.bfd_asymbol_name (const asymbol *sy)
+.{
+. return sy->name;
+.}
+.
+.static inline struct bfd *
+.bfd_asymbol_bfd (const asymbol *sy)
+.{
+. return sy->the_bfd;
+.}
+.
+.static inline void
+.bfd_set_asymbol_name (asymbol *sy, const char *name)
+.{
+. sy->name = name;
+.}
+.
*/
#include "sysdep.h"