summaryrefslogtreecommitdiff
path: root/mcon/U/d_bfd_section.U
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2020-05-19 21:29:57 -0700
committerManoj Srivastava <srivasta@debian.org>2020-05-19 21:29:57 -0700
commit11948971f110800dc35b4f6fec90cc01bebd6a7e (patch)
treed69e6f034efc4ace4c2d573a50153b7a875915f1 /mcon/U/d_bfd_section.U
parent7c4aad4e01c8278e073d28a5c1f59b12582431c1 (diff)
parent50ca5b27f2f7c51d062b3a89d334f7243f467078 (diff)
Diffstat (limited to 'mcon/U/d_bfd_section.U')
-rw-r--r--mcon/U/d_bfd_section.U49
1 files changed, 49 insertions, 0 deletions
diff --git a/mcon/U/d_bfd_section.U b/mcon/U/d_bfd_section.U
new file mode 100644
index 0000000..d876541
--- /dev/null
+++ b/mcon/U/d_bfd_section.U
@@ -0,0 +1,49 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2020, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_bfd_section: Trylink cat d_bfd_lib
+?MAKE: -pick add $@ %<
+?S:d_bfd_section:
+?S: This variable conditionally defines the HAS_BFD_SECTION_1ARG symbol,
+?S: which indicates to the C program that the bfd_section_xxx() accessors
+?S: from the BFD library exists and taks only one argument.
+?S:.
+?C:HAS_BFD_SECTION_1ARG:
+?C: This symbol, if defined, indicates that the bfd_section_xxx() accessors
+?C: from the BFD library takes only one argument, which is the new behaviour
+?C: starting from BFD 2.34.
+?C:.
+?H:#$d_bfd_section HAS_BFD_SECTION_1ARG /**/
+?H:.
+: see whether bfd_section_vma exists and takes 1 argument
+case "$d_bfd_lib" in
+$undef)
+ d_bfd_section=$undef
+ ;;
+*)
+ $cat >try.c <<EOC
+?X: See d_bfd_lib.U to understand why we have to define these symbols.
+#define PACKAGE
+#define PACKAGE_VERSION
+#include <bfd.h>
+int main(void)
+{
+ bfd *b = 0;
+ asection *sec = 0;
+
+ return 0 == bfd_section_vma(sec);
+}
+EOC
+ cyn="whether bfd_section_vma() takes 1 argument"
+ set d_bfd_section
+ eval $trylink
+ ;;
+esac
+