This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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 2/4 v3] IPA: Add alloc_jump_pad_buffer target hook.


> 	* linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
> 	(alloc_jump_pad_buffer): New function.
> 	* linux-amd64-ipa.c: Add <sys/mman.h> include.
> 	(alloc_jump_pad_buffer): New function.
> 	* linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
> 	* linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
> 	(alloc_jump_pad_buffer): New function.
> 	* tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
> 	(initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
> 	* tracepoint.h (alloc_jump_pad_buffer): New prototype.
> 	(getauxval) [!HAVE_GETAUXVAL]: New prototype.

This caused a build failure on my RHEL5 Cell daily build, due to
gdb/gdbserver/linux-ppc-ipa.c: In function 'alloc_jump_pad_buffer':
gdb/gdbserver/linux-ppc-ipa.c:120: error: 'AT_PHDR' undeclared (first use in this function)

The problem seems to be that this system is so old it doesn't have
a <sys/auvx.h> header.  You do provide a fallback getauxval implementation
for those systems, but the AT_PHDR value isn't available.  It is actually
defined in my system headers, in <elf.h>, but this isn't pulled in ---
usually it would be implicitly included from <sys/auxv.h>.

It might be best to add an explicit #include <elf.h> to all files that
make use of AT_... constants, in case HAVE_GETAUXVAL is false.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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