Catherine Moore <clm@codesourcery.com>
Sandra Loosemore <sandra@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
* elfxx-mips.c (mips_elf_local_pic_function_p): Return true when
H is a MIPS16 function with a kept 32-bit stub. Update comments.
(mips_elf_get_la25_target): New function.
(mips_elf_add_la25_intro): Change to use mips_elf_get_la25_target().
(mips_elf_add_la25_stub): Move compute of use_trampoline_p down,
change to use mips_elf_get_la25_target().
(mips_elf_relocation_needs_la25_stub): Add target_is_16_bit_code_p
parameter, add switch case for R_MIPS16_26.
(mips_elf_calculate_relocation): Redirect relocation to point to the
LA25 stub if it exists, instead of the MIPS16 stub. Update arguments
of call to mips_elf_relocation_needs_la25_stub(), don't use la25 stub
for mips16->mips16 calls.
(_bfd_mips_elf_check_relocs): Update arguments of call to
mips_elf_relocation_needs_la25_stub().
(mips_elf_create_la25_stub): Change to use mips_elf_get_la25_target().
Comment says it all:
/* On ia64-hpux, we have discovered that the system linker
adds undefined symbols with nonzero addresses that cannot
be right (their address points inside the code of another
function in the .text section). This creates problems
when trying to determine which symbol corresponds to
a given address.
We try to detect those buggy symbols by checking which
section we think they correspond to. Normally, PLT symbols
are stored inside their own section, and the typical name
for that section is ".plt". So, if there is a ".plt"
section, and yet the section name of our symbol does not
start with ".plt", we ignore that symbol. */
gdb/ChangeLog:
* elfread.c (elf_symtab_read): Ignore undefined symbols with
nonzero addresses if they do not correspond to a .plt section
when one is available in the objfile.
Building the sim on a sparc-solaris 2.8 machine fails when configured
with no extra sim hardware:
> for hw in ; do \
> echo "extern const struct hw_descriptor
> dv_${hw}_descriptor[];" ; \
> done >> tmp-hw.h
> echo 'const char version[] = "'"`sed q
> /[...]/../../gdb/version.in`"'";'
> >> version.c-tmp
> /bin/sh: -c: line 1: syntax error near unexpected token `;'
> /bin/sh: -c: line 1: `for hw in ; do \'
> make[3]: *** [hw-config.h] Error 2
The same thing happens with the version of bash that we got from
Sun as well (which is very old: 2.03.0(1)-release).
The problems comes from the fact that both shells are buggy, and
reject the following script:
for hw in ; do
[...]
done
The above is what sim/common/Makefile.in tries to execute when
generating hw-config.h.
In order to allow users to build out of the box on these machines,
this patch works around this bug. It does rely on the fact that
none of the tokens in SIM_HW contain whitespaces.
sim/common/ChangeLog:
* Make-common.in (hw-config.h): Work around bug in Solaris 2.8
system bourne shell.
* linux-low.c (linux_create_inferior): Put empty if clause for write.
Revert:
2011-12-18 Hui Zhu <teawater@gmail.com>
* linux-low.c (linux_create_inferior): Save return value to ret.
regset_from_core_section.
(amd64obsd_core_init_abi): New function that sets
regset_from_core_section.
(_initialize_amd64obsd_tdep): Use amd64obsd_core_init_abi for
traditional core dumps.
redirect stdin from /dev/null, stdout to stderr.
* remote-utils.c (remote_is_stdio): New static global.
(remote_connection_is_stdio): New function.
(remote_prepare): Handle stdio connection.
(remote_open): Ditto.
(remote_close): Don't close stdin for stdio connections.
(read_prim,write_prim): New functions. Replace all calls to
read/write to these.
* server.c (main): Watch for "-" argument. Move call to
remote_prepare before start_inferior.
* server.h (STDIO_CONNECTION_NAME): New macro.
(remote_connection_is_stdio): Declare.
* mach-o-i386.c (TARGET_PRIORITY): Define as 0 (top priority)
* mach-o-target.c (TARGET_NAME): Use TARGET_PRIORITY
* mach-o-x86-64.c (TARGET_PRIORITY): Define as 0 (top priority)
* mach-o.c (bfd_mach_o_header_p): Remove special handling for
mach-o-i386.
(TARGET_PRIORITY) Set 1 for mach-o-be and mach-o-le, and set 0 for
mach-o-fat.
Nick Clifton <nickc@redhat.com>
* ld-elfvers/vers.exp (picflag): Set to -fpic for mips*-*-* when
using GCC-4.3 or later.
(pic): Set to "yes" for mips*-*-linux*.
* ld-elfvsb/elfvsb.exp: Don't test non-PIC shared libraried on
mips*-*-linux*.
(picflag): Set to -fpic for mips*-*-* when using GCC-4.3 or later.
* ld-elfweak/elfweak.exp (picflag): Set to -fpic for mips*-*-*
when using GCC-4.3 or later.
* ld-shared/shared.exp (picflag): Same.
* lib/ld-lib.exp (at_least_gcc_version): New proc.
(last_message): Delete.
(exception_messages, exception_messages_size): New static globals.
(throw_it): Use exception_messages array to handle nested calls.