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 00/19] libctf, and CTF support for objdump and readelf


This patch series introduces a dependency of binutils on libctf.

This means libctf should be portable to the same range of hosts as 
binutils, all of which can be used as hosts for cross toolchains for a 
range of targets (ELF and non-ELF).  For example, it should be portable to 
hosts such as MinGW or OS X.

Some apparent portability issues in this code include:

* Use of dlfcn.h.  Such use in existing binutils code (e.g. bfd/plugin.c) 
is conditional, to avoid trying to use it on hosts without that 
functionality.

* Use of sys/mman.h.  Again, mmap usage in existing code is appropriately 
conditional.

* Use of sys/errno.h.  The standard name is errno.h.

* Use of elf.h.  Non-ELF hosts won't have such a header.  You should be 
working with the existing include/elf/*.h definitions of ELF data 
structures in binutils.

* Use of gelf.h.  This seems to be something from some versions of libelf, 
which isn't an existing build dependency of binutils at all (and given the 
existence of multiple, incompatible versions of libelf, one should be wary 
of depending on it).  The only gelf.h I have locally here is in a checkout 
of prelink sources.  Again, use existing ELF structures in headers present 
in binutils.

* Use of byteswap.h and endian.h.  Such headers are not portably 
available.  Note how byteswap.h usage in gold / elfcpp is appropriately 
conditional.

-- 
Joseph S. Myers
joseph@codesourcery.com


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