Corinna Vinschen [Mon, 17 Jun 2013 08:33:41 +0000 (08:33 +0000)]
* times.cc (GetSystemTimePreciseAsFileTime): Add comment to declaration.
(__to_clock_t): Remove a debug_printf.
(times): Align syscall_printf to debug output of other system calls.
Corinna Vinschen [Fri, 14 Jun 2013 15:41:17 +0000 (15:41 +0000)]
* autoload.cc (GetSystemTimePreciseAsFileTime): Define.
* times.cc (GetSystemTimePreciseAsFileTime): Temporarily declare here
to workaround missing definition in 32 bit w32api headers.
(get_system_time): New always inline function to call either
GetSystemTimePreciseAsFileTime or GetSystemTimeAsFileTime on a per OS
basis. Call throughout instead of GetSystemTimeAsFileTime.
* wincap.h (wincaps::has_precise_system_time): New element.
* wincap.cc: Implement above element throughout.
Corinna Vinschen [Fri, 14 Jun 2013 09:09:41 +0000 (09:09 +0000)]
Streamline time/times functionality. Remove last remains of former
Windows 9x compatibility.
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Drop now unneeded
casts in calls to_timestruc_t.
(fhandler_base::utimens_fs): Ditto for timespec_to_filetime.
* fhandler_proc.cc (format_proc_stat): Ditto for to_time_t.
* hires.h (class hires_ms): Remove unused member initime_ns.
Remove declarations for timeGetTime_ns and prime.
(hires_ms::uptime): Remove.
* posix_ipc.cc (ipc_cond_timedwait): Ditto for timespec_to_filetime.
* fhandler_registry.cc (fhandler_registry::fstat): Add cast.
* resource.cc (fill_rusage): Call NtQueryInformationProcess rather than
GetProcessTimes to deal with LARGE_INTEGER rather than FILETIME.
* times.cc: Simplify time handling. Throughout, use LARGE_INTEGER
rather than FILETIME to simplify computations. Throughout use
{u}int64_t rather than {unsigned} long long. Drop unneeded casts since
NSPERSEC is 64 bit anyway.
(systime_ns): Remove.
(times): Call NtQuerySystemInformation to fetch boot time. Call
NtQueryInformationProcess rather than GetProcessTimes to deal with
LARGE_INTEGER rather than FILETIME. Call GetSystemTimeAsFileTime.
(totimeval): Use constant 1000000 as in other functions.
(time_t_to_filetime): Remove.
(to_time_t): Change return type to time_t.
(time_as_timestruc_t): Rename filetime to systime.
(time): Ditto. Add cast.
(hires_ns::nsecs): Fix return type cast.
(hires_ms::timeGetTime_ns): Remove.
(hires_ns::prime): Remove.
(hires_ms::nsecs): Drop call to prime. Call GetSystemTimeAsFileTime
directly. Subtract FACTOR here since it's the only function needing
to do so.
(minperiod): Cosmetically change to ULONG.
(hires_ns::resolution): Fix return type cast.
(hires_ms::resolution): Simplify, rely on NtQueryTimerResolution.
* winsup.h: Align time related prototypes to above changes.
Corinna Vinschen [Thu, 13 Jun 2013 19:37:14 +0000 (19:37 +0000)]
* net.cc (gen_old_if_name): New function to generate short interface
names for old pre-1.7 applications.
(get_ifs): Call gen_old_if_name for said old applications.
* 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.