* exceptions.cc (try_to_debug): Don't use yield() when waiting for another
process.
(sigpacket::setup_handler): Fix long-standing problem where loop could exit
with lock held.
* cygwait.cc (cygwait): Remove lock around sig retrieval since this code is
essentially guarded by thread-specific signal_arrived.
* exceptions.cc (_cygtls::handle_SIGCONT): Simplify. Eliminate lock/unlock
since code is guarded by signal_arrived.
gas/
2013-06-08 Catherine Moore <clm@codesourcery.com>
* config/tc-mips.c (is_opcode_valid): Build ASE mask.
(is_opcode_valid_16): Pass ase value to opcode_is_member.
(append_insn): Change INSN_xxxx to ASE_xxxx.
include/
2013-06-08 Catherine Moore <clm@codesourcery.com>
* opcode/mips.h (mips_opcode): Add ase field.
(INSN_ASE_MASK): Delete.
(INSN_DSP): Rename to ASE_DSP. Provide new value.
(INSN_DSPR2): Rename to ASE_DSPR2. Provide new value.
(INSN_MCU): Rename to ASE_MCU. Provide new value.
(INSN_MDMX): Rename to ASE_MDMX. Provide new value.
(INSN_MIPS3d): Rename to ASE_MIPS3D. Provide new value.
(INSN_MT): Rename to ASE_MT. Provide new value.
(INSN_SMARTMIPS): Rename to ASE_SMARTMIPS. Provide new value.
(INSN_VIRT): Rename to ASE_VIRT. Provide new value.
(INSN_VIRT64): Rename to ASE_VIRT64. Provide new value.
(opcode_is_member): Add ase argument. Check ase.
opcodes/
2013-06-08 Catherine Moore <clm@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
* micromips-opc.c (D32, D33, MC): Update definitions.
(micromips_opcodes): Initialize ase field.
* mips-dis.c (mips_arch_choice): Add ase field.
(mips_arch_choices): Initialize ase field.
(set_default_mips_dis_options): Declare and setup mips_ase.
* mips-opc.c (M3D, SMT, MX, IVIRT, IVIRT64, D32, D33, D64,
MT32, MC): Update definitions.
(mips_builtin_opcodes): Initialize ase field.
Will Newton [Fri, 7 Jun 2013 18:57:00 +0000 (18:57 +0000)]
aarch64: Add support for GNU indirect functions.
Add support for STT_GNU_IFUNC symbols to the AArch64 bfd backend. The tests
are ported from the ld-ifunc tests but are enabled for cross builds so can
be run easily without hardware or a simulator.
bfd/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* configure: Regenerate.
* configure.in: Build elf-ifunc.o for AArch64.
* elf64-aarch64.c: Include objalloc.h.
(elf64_aarch64_howto_dynrelocs): Add R_AARCH64_IRELATIVE howto.
(struct elf64_aarch64_link_hash_table): Add members for handling
R_AARCH64_IRELATIVE relocations.
(elf_aarch64_local_htab_hash): New function.
(elf_aarch64_local_htab_eq): New function.
(elf_aarch64_get_local_sym_hash): New function.
(elf64_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
symbol hash.
(elf64_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
(elf64_aarch64_final_link_relocate): Add sym argument. Add support
for handling STT_GNU_IFUNC symbols.
(elf64_aarch64_gc_sweep_hook): Add support for garbage collecting
references to STT_GNU_IFUNC symbols.
(elf64_aarch64_adjust_dynamic_symbol): Add support for handling
STT_GNU_IFUNC symbols.
(elf64_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
symbols. Ensure we don't increase plt.refcount from -1 to 0.
(elf64_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
(elf64_aarch64_is_function_type): Remove function.
(elf64_aarch64_allocate_dynrelocs): Call
_bfd_elf_allocate_ifunc_dyn_relocs for STT_GNU_IFUNC symbols.
(elf_aarch64_allocate_local_dynrelocs): New function.
(elf64_aarch64_size_dynamic_sections): Call
elf_aarch64_allocate_local_dynrelocs. Initialize next_irelative_index.
(elf64_aarch64_create_small_pltn_entry): Add info argument.
Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
(elf64_aarch64_finish_dynamic_symbol): Add support for handling
STT_GNU_IFUNC symbols and .iplt.
(elf_aarch64_finish_local_dynamic_symbol): New function.
(elf64_aarch64_finish_dynamic_sections): Call
elf_aarch64_finish_local_dynamic_symbol.
(elf64_aarch64_add_symbol_hook): New function.
* fhandler_disk_file.cc (fhandler_disk_file::pread): Skip to non-atomic
code if mandatory locking is used on this descriptor. Explain why.
(fhandler_disk_file::pwrite): Ditto.
* posix.sgml (std-notes): Extend description of file locking.
* exceptions.cc (_cygtls::handle_SIGCONT): Simplify loop waiting for
sig_handle_tty_stop to wake up. Make sure to unlock before calling
yield to avoid starvation of sig_handle_tty_stop. Add comments.
* miscfuncs.cc (yield): Explain why yield should never be called under
_cygtls::lock conditions. Call SleepEx with 1ms timeout. Explain why.
* Makefile.in: Add rule to rebuild Makefile if Makefile.in changes.
Include Makefile.dep last.
(Makefile.dep): Run xidepend within source dir. Temporarily drop
faq.xml from dependencies.
* xidepend: Fix creating base filename to accommodate VPATH.
Corinna Vinschen [Mon, 27 May 2013 19:31:04 +0000 (19:31 +0000)]
* dll_init.cc (dll_list::topsort): Fix early-return condition to
accommodate process with all runtime loaded DLLs already dlclosed
at fork time.
* gendef (_sigfe_maybe): Fix code handling early return if we don't
have a tls, broken on 2013-05-21.
Corinna Vinschen [Fri, 24 May 2013 21:12:16 +0000 (21:12 +0000)]
* Makefile.in (DEFS): Unused, remove.
(COMPILE.cc): Move -mno-use-libstdc-wrappers flag from here...
($(TEST_DLL_NAME)): ...to here since it's a link time flag.
Corinna Vinschen [Fri, 24 May 2013 13:32:10 +0000 (13:32 +0000)]
* environ.cc (win_env::add_cache): Set the Windows environment variable
using wide chars to make sure native chars don't get scrambled.
* environ.h (build_env): Fix formatting in declaration.
* pinfo.cc (pinfo::status_exit): Handle STATUS_NO_MEMORY. Explain why.
Corinna Vinschen [Thu, 23 May 2013 20:10:35 +0000 (20:10 +0000)]
* dcrt0.cc (child_info_fork::alloc_stack_hard_way): Fix datatype of
stacksize to SIZE_T. Cast to SIZE_T in pointer arithmetic. Slightly
enhance output in case of a fatal error.
* fork.cc (frok::parent): Always set ch.stackaddr to DeallocationStack
value of current thread to help stack reservation in
child_info_fork::alloc_stack_hard_way along. Simplify subsequent code
storing stack values in ch. Print guardsize in hex, too.
Corinna Vinschen [Thu, 23 May 2013 14:26:53 +0000 (14:26 +0000)]
* cygwinenv.xml (cygwinenv-implemented-options): Explain new
winsymliks:nativestrict option. Strip out description of symlink types
and refer to new pathnames-symlinks section.
* highlights.xml (ov-hi-files): Rip out most of symlink description and
refer to new pathnames-symlinks section instead.
* new-features.xml (ov-new1.7.19): Add CYGWIN=winsymlinks:nativestrict.
* pathnames.xml (pathnames-symlinks): New section describing symbolic
link handling.
Corinna Vinschen [Thu, 23 May 2013 14:23:01 +0000 (14:23 +0000)]
* environ.cc (set_winsymlinks): Handle "winsymlinks:nativestrict"
option. On pre-Vista warn the user if the "winsymlinks:native*" option
is set.
* globals.cc (enum winsym_t): Add WSYM_nativestrict.
* path.cc (symlink_native): Don't create native symlink if target
does not exist. Explain why. Improve comments.
(symlink_worker): Change AFS symlink handling to WSYM_nativestrict.
Handle WSYM_nativestrict throughout. Change condition for bail out
to wsym_type == WSYM_nativestrict. Add comment. Fix formatting.
* shared_info.h (CURR_USER_MAGIC): Change to reflect change in
class user_info.
(class user_info): Add member warned_nonativesyms.
gas/
2013-05-22 Jürgen Urban <JuergenUrban@gmx.de>
* config/tc-mips.c (macro): Handle M_LQC2_AB and M_SQC2_AB.
gas/testsuite/
2013-05-22 Jürgen Urban <JuergenUrban@gmx.de>
* gas/mips/r5900-full.s, gas/mips/r5900-full.d: Add tests for LQ
and SQ macros.
* gas/mips/r5900-vu0.s, gas/mips/r5900-vu0.d: New test.
* gas/mips/mips.exp: Run it.
Corinna Vinschen [Wed, 22 May 2013 16:55:55 +0000 (16:55 +0000)]
* spinlock.h (ULONG): Replace LONG operator with ULONG to accommodate
the fact that CURR_SHARED_MAGIC and USER_SHARED_MAGIC are unsigned
values.
* shared.cc (shared_info::initialize): Drop explicit cast here.
Corinna Vinschen [Tue, 21 May 2013 09:32:12 +0000 (09:32 +0000)]
Reinstantiate accidentally removed patch from 2009-05-16:
* Makefile.in (cygpath.exe): Link against cygwin.a before linking
against ntdll.dll to avoid linking symbols defined in both DLLs
from ntdll.
(ps.exe): Ditto.
* sigproc.cc (sig_hold): Delete.
(sigheld): Delete.
(sig_send): Eliminate special-case __SIGHOLD handling.
(wait_sig): Just flag when signals are on hold and add them to the queue rather
than stalling the wait_sig loop. Clear the flag when __SIGNOHOLD is specified.
Corinna Vinschen [Tue, 14 May 2013 13:34:05 +0000 (13:34 +0000)]
* Makefile.in (localtime_CFLAGS): Define as -fwrapv since localtime
code requires int overflows to be fully defined.
* localtime.cc: Align a bit more to upstream code.
Warren Young [Mon, 13 May 2013 21:17:22 +0000 (21:17 +0000)]
Removed setup.xml and cygwin-ug.xml: they were not inputs to any of the
documentation outputs. Apparently they were the predecessors of
setup-net.xml and cygwin-ug-net.xml. I don't know if for a time there
were parallel versions of the manuals and one fork died, or if the cutover
was clean and the old versions were just never removed. Either way,
they're dead junk now.
Warren Young [Fri, 10 May 2013 15:58:48 +0000 (15:58 +0000)]
- Added <?xml> and <!DOCTYPE> tags to the top of utils.xml and pretty-
printed it.
- Removed obsolete utils.sgml
- Added a ChangeLog entry for this replacement, which partially took
place days ago. This checkin formalizes the switch from SGML to
DocBook XML for this file.
gas/ChangeLog:
* config/tc-mips.c (struct mips_set_options): New ase_virt field.
(mips_opts): Update for the new field.
(file_ase_virt): New variable.
(ISA_SUPPORTS_VIRT_ASE): New macro.
(ISA_SUPPORTS_VIRT64_ASE): New macro.
(MIPS_CPU_ASE_VIRT): New define.
(is_opcode_valid): Handle ase_virt.
(macro_build): Handle "+J".
(validate_mips_insn): Likewise.
(mips_ip): Likewise.
(enum options): Add OPTION_VIRT and OPTION_NO_VIRT.
(md_longopts): Add mvirt and mnovirt
(md_parse_option): Handle OPTION_VIRT and OPTION_NO_VIRT.
(mips_after_parse_args): Handle ase_virt field.
(s_mipsset): Handle "virt" and "novirt".
(mips_elf_final_processing): Add a comment about virt ASE might need a new flag.
(md_show_usage): Print out the usage of -mvirt and mno-virt options.
* doc/c-mips.texi: Document -mvirt and -mno-virt.
Document ".set virt" and ".set novirt".
gas/testsuite/ChangeLog:
* gas/mips/mips.exp: Run virt and virt64 testcases.
* gas/mips/virt.d: New file.
* gas/mips/virt.s: New file.
* gas/mips/virt64.d: New file.
* gas/mips/virt64.s: New file.
include/opcode/ChangeLog:
* mips.h (OP_MASK_CODE10): Correct definition.
(OP_SH_CODE10): Likewise.
Add a comment that "+J" is used now for OP_*CODE10.
(INSN_ASE_MASK): Update.
(INSN_VIRT): New macro.
(INSN_VIRT64): New macro
opcodes/ChangeLog:
* mips-dis.c (mips_arch_choices): Add INSN_VIRT to mips32r2 .
Add INSN_VIRT and INSN_VIRT64 to mips64r2.
(parse_mips_dis_option): Handle the virt option.
(print_insn_args): Handle "+J".
(print_mips_disassembler_options): Print out message about virt64.
* mips-opc.c (IVIRT): New define.
(IVIRT64): New define.
(mips_builtin_opcodes): Add dmfgc0, dmtgc0, hypcall, mfgc0, mtgc0,
tlbgr, tlbgwi, tlbginv, tlbginvf, tlbgwr, tlbgp VIRT instructions.
Move rfe to the bottom as it conflicts with tlbgp.
Jeff Johnston [Wed, 8 May 2013 23:13:51 +0000 (23:13 +0000)]
2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/sys/config.h (_REENT_GLOBAL_ATEXIT): Define for
RTEMS.
* libc/include/sys/reent.h (_reent): Use _REENT_GLOBAL_ATEXIT.
(_global_atexit): Declare if _REENT_GLOBAL_ATEXIT is defined.
* libc/reent/reent.c (_reclaim_reent): Remove atexit cleanup if
_REENT_GLOBAL_ATEXIT is defined.
(_wrapup_reent): Remove atexit handling if _REENT_GLOBAL_ATEXIT
is defined.
* libc/stdlib/__atexit.c (_global_atexit0): Define if
_REENT_GLOBAL_ATEXIT is defined.
* libc/stdlib/__call_atexit.c (_global_atexit): Define if
_REENT_GLOBAL_ATEXIT is defined.
* fhandler_tty.cc (fhandler_pty_common::__acquire_output_mutex): Never wait an
INFINITE amount of time. Instead default to 1/10 second.
(fhandler_pty_slave::open): Just default to INFINITE wait rather than
(now) waiting longer than previously.