This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Convert .note.gnu.property section between ELF32 and ELF64


On 9 Aug 2018, at 04:58, H.J. Lu <hjl.tools@gmail.com> wrote:
> 
> 	* bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
> 	calling _bfd_elf_convert_gnu_property_size to convert
> 	.note.gnu.property section size.
> 	(bfd_convert_section_contents): Check BFD_DECOMPRESS after
> 	calling _bfd_elf_convert_gnu_properties to convert
> 	.note.gnu.property section.

This patch breaks building binutils on macOS and presumably on other non-ELF platforms:

/bin/sh ./libtool  --tag=CC   --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -I../../../binutils-gdb/binutils/../zlib -g -O2  -Wl,-no_pie  -o size size.o bucomm.o version.o filemode.o ../bfd/libbfd.la ../libiberty/libiberty.a  
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -I../../../binutils-gdb/binutils/../zlib -g -O2 -Wl,-no_pie -o size size.o bucomm.o version.o filemode.o  ../bfd/.libs/libbfd.a -L/Users/johnm/thirdparty/build/gdb/zlib -ldl -lz ../libiberty/libiberty.a
Undefined symbols for architecture x86_64:
  "__bfd_elf_convert_gnu_properties", referenced from:
      _bfd_convert_section_contents in libbfd.a(bfd.o)
  "__bfd_elf_convert_gnu_property_size", referenced from:
      _bfd_convert_section_size in libbfd.a(bfd.o)
ld: symbol(s) not found for architecture x86_64

bfd/bfd.c now contains direct calls to _bfd_elf_convert_gnu_property_size() and _bfd_elf_convert_gnu_properties(), but if you don't have elf-properties.c in your build there are no such functions.

    John

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]