bfd: Move elf-properties.lo to BFD32_LIBS
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Aug 2018 14:24:31 +0000 (07:24 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Aug 2018 14:24:44 +0000 (07:24 -0700)
commit 6404ab993797d1d6cd3d9e97cc281e3cb6226c12
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Aug 8 21:00:04 2018 -0700

    Convert .note.gnu.property section between ELF32 and ELF64

updated bfd_convert_section_size and bfd_convert_section_contents
in bfd.c to call _bfd_elf_convert_gnu_property_size and
_bfd_elf_convert_gnu_properties, which are defined in elf-properties.c.
It led to

bfd.c:2484: undefined reference to `_bfd_elf_convert_gnu_property_size'

for non-ELF targets.  Since elf-properties.c is a generic implementation
and doesn't reference any ELF specific functions directly, this patch
moves elf-properties.lo BFD32_LIBS.

Tested for many ELF and non-ELF targets.

PR binutils/23494
* Makefile.am (BFD32_LIBS): Add elf-properties.lo.
(BFD32_LIBS_CFILES): Add elf-properties.c.
(BFD32_BACKENDS): Remove elf-properties.lo.
(BFD32_BACKENDS_CFILES): Remove elf-properties.c.
* configure.ac (elf): Remove elf-properties.lo.
* Makefile.in: Regenerated.
* configure: Likewise.

bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/configure
bfd/configure.ac

index 8d8f0a6914651c1aab615d6213b2bd3d56e5b0e5..3169eb9e9826b73e052cba7a835ccb06044c28eb 100644 (file)
@@ -1,3 +1,14 @@
+2018-08-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/23494
+       * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
+       (BFD32_LIBS_CFILES): Add elf-properties.c.
+       (BFD32_BACKENDS): Remove elf-properties.lo.
+       (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
+       * configure.ac (elf): Remove elf-properties.lo.
+       * Makefile.in: Regenerated.
+       * configure: Likewise.
+
 2018-08-11  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/23428
index 9c299df8d834de505e453b347e9183b85de49e58..2626ceb0a5933a1f828c96243dacbfce638be3cf 100644 (file)
@@ -70,17 +70,17 @@ BFD_H = bfd.h
 # need two copies of the executable, one to download and one for the
 # debugger).
 BFD32_LIBS = \
-       archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
-       cache.lo coff-bfd.lo compress.lo corefile.lo format.lo hash.lo \
-       init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \
+       archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo \
+       coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo \
+       hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \
        section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo \
        binary.lo ihex.lo srec.lo tekhex.lo verilog.lo
 
 BFD64_LIBS = archive64.lo
 
 BFD32_LIBS_CFILES = \
-       archive.c archures.c bfd.c bfdio.c bfdwin.c \
-       cache.c coff-bfd.c compress.c corefile.c format.c hash.c \
+       archive.c archures.c bfd.c bfdio.c bfdwin.c cache.c coff-bfd.c \
+       compress.c corefile.c elf-properties.c format.c hash.c \
        init.c libbfd.c linker.c merge.c opncls.c reloc.c \
        section.c simple.c stab-syms.c stabs.c syms.c targets.c \
        binary.c ihex.c srec.c tekhex.c verilog.c
@@ -293,7 +293,6 @@ BFD32_BACKENDS = \
        elf-m10200.lo \
        elf-m10300.lo \
        elf-nacl.lo \
-       elf-properties.lo \
        elf-strtab.lo \
        elf-vxworks.lo \
        elf.lo \
@@ -431,7 +430,6 @@ BFD32_BACKENDS_CFILES = \
        elf-m10200.c \
        elf-m10300.c \
        elf-nacl.c \
-       elf-properties.c \
        elf-strtab.c \
        elf-vxworks.c \
        elf.c \
index c1c02924c563fcf3f3601dfcf7b591c1e2b44f6c..e63d63ab9eadd2333bc2ef58273673b2cf836e2b 100644 (file)
@@ -182,10 +182,11 @@ am__installdirs = "$(DESTDIR)$(bfdlibdir)" \
 LTLIBRARIES = $(bfdlib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 am__objects_1 = archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
-       cache.lo coff-bfd.lo compress.lo corefile.lo format.lo hash.lo \
-       init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \
-       section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo \
-       binary.lo ihex.lo srec.lo tekhex.lo verilog.lo
+       cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo \
+       format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo \
+       opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo \
+       syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo \
+       verilog.lo
 am_libbfd_la_OBJECTS = $(am__objects_1)
 libbfd_la_OBJECTS = $(am_libbfd_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -493,16 +494,16 @@ BFD_H = bfd.h
 # need two copies of the executable, one to download and one for the
 # debugger).
 BFD32_LIBS = \
-       archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
-       cache.lo coff-bfd.lo compress.lo corefile.lo format.lo hash.lo \
-       init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \
+       archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo \
+       coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo \
+       hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \
        section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo \
        binary.lo ihex.lo srec.lo tekhex.lo verilog.lo
 
 BFD64_LIBS = archive64.lo
 BFD32_LIBS_CFILES = \
-       archive.c archures.c bfd.c bfdio.c bfdwin.c \
-       cache.c coff-bfd.c compress.c corefile.c format.c hash.c \
+       archive.c archures.c bfd.c bfdio.c bfdwin.c cache.c coff-bfd.c \
+       compress.c corefile.c elf-properties.c format.c hash.c \
        init.c libbfd.c linker.c merge.c opncls.c reloc.c \
        section.c simple.c stab-syms.c stabs.c syms.c targets.c \
        binary.c ihex.c srec.c tekhex.c verilog.c
@@ -716,7 +717,6 @@ BFD32_BACKENDS = \
        elf-m10200.lo \
        elf-m10300.lo \
        elf-nacl.lo \
-       elf-properties.lo \
        elf-strtab.lo \
        elf-vxworks.lo \
        elf.lo \
@@ -854,7 +854,6 @@ BFD32_BACKENDS_CFILES = \
        elf-m10200.c \
        elf-m10300.c \
        elf-nacl.c \
-       elf-properties.c \
        elf-strtab.c \
        elf-vxworks.c \
        elf.c \
index 2ba044d786c75462ec10561f78b4a4ce218d8572..8c83a6a08eebed87837997f5ad5f8e6b580c2e5f 100755 (executable)
@@ -14637,8 +14637,8 @@ selarchs="$f"
 # Target backend .o files.
 tb=
 
-elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-properties.lo
-     elf-eh-frame.lo dwarf1.lo dwarf2.lo"
+elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo
+     dwarf1.lo dwarf2.lo"
 coffgen="coffgen.lo dwarf2.lo"
 coff="cofflink.lo $coffgen"
 ecoff="ecofflink.lo $coffgen"
index fc4331c6175e1a266a73a654f3ecefe7fd6b6312..787ac7fa658350168dffb069f0b9fa03143d10b2 100644 (file)
@@ -405,8 +405,8 @@ selarchs="$f"
 # Target backend .o files.
 tb=
 
-elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-properties.lo
-     elf-eh-frame.lo dwarf1.lo dwarf2.lo"
+elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo
+     dwarf1.lo dwarf2.lo"
 coffgen="coffgen.lo dwarf2.lo"
 coff="cofflink.lo $coffgen"
 ecoff="ecofflink.lo $coffgen"