Commit Graph

14237 Commits

Author SHA1 Message Date
Christopher Faylor 0a3819e655 clarify latest entry 2012-04-13 05:05:42 +00:00
Christopher Faylor 3bfa9d984b * devices.in (exists_console): Allow /dev/con{sole,in,out} to be referenced
they exist.
* devices.cc: Regenerate.
* fhandler_console.cc (fhandler_console::set_unit): Ditto.
2012-04-13 02:30:51 +00:00
David S. Miller 416b2d8719 Support R_SPARC_WDISP10 and R_SPARC_H34.
include/

	* elf/sparc.h (R_SPARC_WDISP10): New reloc.
	* opcode/sparc.h: Define '=' as generating R_SPARC_WDISP10.

opcodes/

	* sparc-dis.c (X_DISP10): Define.
	(print_insn_sparc): Handle '='.

bfd/

	* reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
	BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Likewise.
	* elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
	(_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
	R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
	(_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
	(_bfd_sparc_elf_check_relocs): Likewise.
	(_bfd_sparc_elf_gc_sweep_hook): Likewise.
	(_bfd_sparc_elf_relocate_section): Likewise.

gas/

	* config/tc-sparc.c (sparc_ip): Handle '=', "%h34", "%l34", and
	BFD_RELOC_SPARC_H34.
	(md_apply_fix): Handle BFD_RELOC_SPARC_WDISP10 and BFD_RELOC_SPARC_H34.
	(tc_gen_reloc): Likewise.

gas/testsuite/

	* gas/sparc/reloc64.s: Add abs34 code model tests.
	* gas/sparc/reloc64.d: Update.

elfcpp/

	* sparc.h (R_SPARC_WDISP10): New relocation.

gold/

	* sparc.cc (Reloc::wdisp10): New relocation method.
	(Reloc::h34): Likewise.
	(Target_sparc::Scan::check_non_pic): Handle R_SPARC_H34.
	(Target_sparc::Scan::get_reference_flags): Handle R_SPARC_H34 and
	R_SPARC_WDISP10.
	(Target_sparc::Scan::local): Likewise.
	(Target_sparc::Scan::global): Likewise.
	(Target_sparc::Relocate::relocate): Likewise.
2012-04-12 16:26:04 +00:00
Nick Clifton 0c91015243 * configure.ac (ia64*-*-*vms*): Add support for ld.
* configure: Regenerate.

	* scripttempl/ia64vms.sc: New file.
	* emultempl/vms.em (_before_parse): Support for ia64.
	(elf64-ia64-vms): New fragment for ia64.
	* emulparams/elf64_ia64_vms.sh: New file.
	* configure.tgt (ia64-*-*vms*): Add.
	* Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64_ia64_vms.c
	(eelf64_ia64_vms.c): New rule.
	* Makefile.in: Regenerate.

	* elflink.c (elf_link_output_extsym): Add a guard.
	(bfd_elf_final_link): Remove assertion.
	(bfd_elf_final_link): Add a guard.
	* elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
	(elfNN_vms_section_from_shdr, elfNN_vms_object_p)
	(elfNN_vms_post_process_headers, elfNN_vms_section_processing)
	(elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
	Remove.
	(elfNN-ia64-vms target): Move to ...
	* elf64-ia64-vms.c: New file.
	* configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
	* Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
	(BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
2012-04-12 07:34:57 +00:00
Michael Frysinger 29243f0f87 gdb: add callback defines for new ARGV handling
The common sim code has slightly unfinished support for these already,
but even arch ports are unable to handle these if the common header does
not define them.  This is because the generated callback header includes
simple common gdb/sim headers only which causes it to skip the new ARGV
syscalls.  Plus, it isn't like providing these in the common header will
break any sim targets which don't want them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-12 05:33:15 +00:00
Corinna Vinschen e62d782aec * syscalls.cc (fhandler_base::stat_fixup): Fix inode numbers of
non-device files in virtual fileysystems.
2012-04-11 08:49:52 +00:00
DJ Delorie a281df5589 merge from gcc 2012-04-10 17:07:28 +00:00
Roland McGrath 1036f9f1bf bfd/
* elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
	* elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
	(nacl_modify_program_headers): Likewise.

include/
	* bfdlink.h (struct bfd_link_info): Add new member user_phdrs.
2012-04-09 16:27:18 +00:00
Christopher Faylor e5b7e4d1c7 * dtable.cc (cygwin_attach_handle_to_fd): Defend against NULL return from
build_fh_*.
(dtable::init_std_file_from_handle): Ditto.
* mmap.cc (mmap_record::alloc_fh): Ditto.
* path.cc (path_conv::check): Ditto.
2012-04-07 17:32:44 +00:00
Christopher Faylor 00ceaad134 * fhandler.h (fhandler_base::nohandle): Implement "by hand" rather than through
macro.  Set io_handle to INVALID_HANDLE_VALUE when setting flag to true.
2012-04-06 19:40:58 +00:00
Christopher Faylor 25fdb1ded1 * path.c (path_conv::check): Avoid directly referencing fields of the dev
structure when it can be easily avoided.
2012-04-06 04:40:49 +00:00
Christopher Faylor 7217f94752 Fix a couple of typos. 2012-04-06 04:36:22 +00:00
Corinna Vinschen d422f9e30f * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 14. 2012-04-05 15:26:27 +00:00
Corinna Vinschen 93bb67edb2 * new-features.sgml (ov-new1.7.13): Add typeahead description. 2012-04-05 15:04:24 +00:00
Christopher Faylor 82405d4448 Add typeahead description. 2012-04-05 14:23:06 +00:00
Corinna Vinschen 260738bd33 * new-features.sgml (ov-new1.7.13): New section. Add entry for
mkpasswd/mkgroup change to print TrustedInstaller account.
2012-04-05 13:41:49 +00:00
Corinna Vinschen ba17d0ed88 *** empty log message *** 2012-04-05 13:39:59 +00:00
Corinna Vinschen 036fb4772c * mkgroup.c (print_special_by_sid): Rename from print_special. Change
calls throughout.
	(print_special_by_name): New function.
	(main): Call print_special_by_name for TrustedInstaller account.
	* mkpasswd.c (print_special_by_sid): Rename from print_special.  Change
	calls throughout.
	(print_special_by_name): New function.
	(enum_std_accounts): Call print_special_by_name for TrustedInstaller
	account.
2012-04-05 13:37:32 +00:00
Corinna Vinschen b475fe5497 * passwd.cc (pwdgrp::read_passwd): Fix pretty_ls entry tyo contain
the required number of colons.
2012-04-05 10:16:09 +00:00
Christopher Faylor 7b03b0d8ce * fhandler.h (fhandler_pty_common::bytes_available): Declare new function.
(fhandler_pty_master::flush_to_slave): Ditto.
* fhandler_tty.cc (bytes_available): Define new function.
(fhandler_pty_common::bytes_available): Ditto.
(handler_pty_master::flush_to_slave): Ditto.
(fhandler_pty_master::process_slave_output): Call flush_to_slave () here.  Use
bytes_available () rather than PeekNamedPipe.  Cleanup sloppy logic.
(fhandler_pty_slave::read): Use bytes_available () rather than PeekNamedPipe.
(fhandler_pty_slave::ioctl): Ditto.
(fhandler_pty_master::ioctl): Ditto.
(fhandler_pty_master::cleanup): Remove ancient #if 0.
* select.cc (peek_pipe): Call flush_to_slave whenever we're checking for a pty
master.
2012-04-05 02:54:51 +00:00
Corinna Vinschen ffcd2c3f89 * fhandler_nodevice.cc (fhandler_nodevice::open): Convert EROFS to
ENOENT if non-existent file got opened for reading only.  Explain why.
	* path.cc (path_conv::check): Stick to ENOENT if file has been opened
	for informational purposes only.  Add to comment.
2012-04-04 12:45:24 +00:00
Corinna Vinschen ce508e512a * path.cc (path_conv::check): Convert device type to FH_FS for
non-existant files on /dev, unless /dev itself doesn't exist on disk.
	Add comment to explain why.
2012-04-04 12:06:21 +00:00
Corinna Vinschen 9e1fe26d12 * hookapi.cc (rvadelta): Compute max_size using SizeOfRawData rather
than VirtualSize.
2012-04-04 11:09:44 +00:00
Corinna Vinschen 7c1d11f7e8 * passwd.cc (_getpass_close_fd): New static pthread cleanup handler.
(getpass): Rework to use /dev/tty in the first place.  Install
	_getpass_close_fd as pthread cleanup handler.  Flush prompt explicitely.
	Lock input and switch off signal input handling when reading password.
2012-04-04 09:57:17 +00:00
Corinna Vinschen ecdcf15712 2012-04-03 Corinna Vinschen <corinna@vinschen.de>
* new-features.sgml (ov-new1.7.12): Fix layout of flock example.
2012-04-03 19:16:10 +00:00
Corinna Vinschen fba41a7c3d * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 13. 2012-04-03 14:54:17 +00:00
Corinna Vinschen f777ddfbe3 * syscalls.cc (fhandler_base::stat_fixup): Replace string comparison
with new device::is_dev_resident() call.
2012-04-03 07:28:48 +00:00
Christopher Faylor 17a61045ff * devices.h (lives_in_dev): New field.
(dev_on_fs): Set bit size.
(is_dev_resident): Define new method.
* devices.in: Use different method for labelling requested name for dev
storage: prefix it with a ='.  Use an actual ':' to denote an internal device.
(exists_console): Avoid repeated test.
(exists_ntdev_silent): Rename from the less-descriptive exists_ntdevs.
(dev_dev_storage): Delete unneeded define.
* gendevices: Add a flag to each line denoting whether the device lives in /dev
space.
(generate): Handle special ":" case here for internal devices.  Parse
=something_dev as requiring a storage location.  Tack the rest of the line back
onto the reformulated "$rest".
* devices.cc: Regenerate.
2012-04-02 20:41:46 +00:00
Corinna Vinschen eb7729eb36 * devices.h (device::get_device): New method.
* fhandler_dev.cc (fhandler_dev::readdir): Set st_ino to device number.
	* syscalls.cc (fhandler_base::stat_fixup): Ditto.  Fix link count for
	CD-ROM devices.  Fix typo in comment.
2012-04-02 19:25:58 +00:00
Corinna Vinschen 467e17b9af * fhandler.h (fhandler_base::stat_fixup): Rename from
fhandler_base::set_ino_and_dev.
	* syscalls.cc (fhandler_base::stat_fixup): Ditto. Accommodate name
	change throughout.  Fixup link count of console devices.
2012-04-02 16:19:29 +00:00
Corinna Vinschen f7c8c4540a * devices.h (FH_CYGDRIVE): Define as DEV_VIRTFS_MAJOR class device.
(DEV_CYGDRIVE_MAJOR): Remove.
	(iscygdrive_dev): Define.
	* dtable.cc (fh_alloc): Accommodate above change.
	* path.cc (path_conv::check): Use iscygdrive_dev to check for cygdrive.
	* syscalls.cc (fhandler_base::set_ino_and_dev): Drop check for
	DEV_CYGDRIVE_MAJOR from conditional.
2012-04-02 15:56:43 +00:00
Corinna Vinschen 1f312200d3 * devices.h (FH_DEV): Define as DEV_VIRTFS_MAJOR class device.
(DEV_DEV_MAJOR): Remove.
	* dtable.cc (fh_alloc): Accommodate above change.
	* syscalls.cc (set_ino_and_dev): Drop check for DEV_DEV_MAJOR from
	conditional.
2012-04-02 11:45:56 +00:00
Corinna Vinschen 949cc8b640 * fhandler.h (fhandler_base::set_ino_and_dev): Declare.
* syscalls.cc (fhandler_base::set_ino_and_dev): New method to set
	st_ino, st_dev, and st_rdev for devices in a single spot.
	(fstat64): Call fhandler_base::set_ino_and_dev instead of setting
	st_ino, st_dev, and st_rdev here.
	(stat_worker): Ditto.
2012-04-02 11:18:45 +00:00
Corinna Vinschen da8274643c * fhandler.h (fhandler_dev::open): Declare.
(fhandler_dev::close): Declare.
	(fhandler_dev::fstat): Declare.
	(fhandler_dev::fstatvfs): Declare.
	(fhandler_cygdrive::fstatvfs): Declare.
	* fhandler_dev.cc (fhandler_dev::open): New method.
	(fhandler_dev::close): Ditto.
	(fhandler_dev::fstat): Ditto.
	(fhandler_dev::fstatvfs): Ditto.
	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Don't fill
	st_rdev.
	(fhandler_cygdrive::fstatvfs): New method.
	* path.h (path_conv::fs_got_fs): New method.
	* mount.h (fs_info::got_fs): Change type to bool, make public.
2012-04-02 11:08:07 +00:00
Corinna Vinschen 5346e8aebb * mount.cc (fillout_mntent): Use "none" rather than 0 when checking
FS type.
2012-04-02 11:00:17 +00:00
Christopher Faylor 881beea81d * dtable.cc (dtable::fixup_close): Define new function.
(dtable::fixup_after_exec): Use fixup_close() and detect when it was not
possible to open an inherited file handle.
(dtable::fixup_after_fork): Defensively close any file handles which were not,
for some reason, inheritable.
* dtable.h: Make #pragma once.
(dtable::fixup_close): Declare new function.
* fhandler_console.cc (fhandler_console::set_unit): Set I/O handles to NULL
when this function fails.
2012-04-01 22:28:39 +00:00
Corinna Vinschen c4ee9311c2 * fhandler_dev.cc (fhandler_dev::readdir): Fix formatting. Simplify
code.  Use device::type() to fetch dirent compatible device type.
	Add comment.
2012-04-01 10:38:07 +00:00
Christopher Faylor 727a81f4d9 * devices.h (device::exists_func): Redefine field.
(device::dev_on_fs): Remove unneeded bit field.  Just make a normal boolean.
(device::exists): Redefine function.
* devices.in: Move previous functions earlier since they are now only defined
static.  Rename some functions due to an as-yet unresolved bug in gendevices.
Rename posix part of internal-only devices with a double-slash.  gendevices
will eventuall translate that to a ":".
(device::parse): Rework to use dev pointer and dev_storage_end.
* devices.cc: Regenerate.
* gendevices: Translate "// to ": after shilka processing.
2012-04-01 07:19:52 +00:00
Corinna Vinschen e2e887c5ac * devices.cc: Regenerate.
* devices.h (device::exists_func): New member function pointer,
	replacing noexpose.
	(device::expose): Remove.
	(device::exists_never): Declare.
	(device::exists_ptys): Declare.
	(device::exists_cons): Declare.
	(device::exists_console): Declare.
	(device::exists_nt_dev): Declare.
	(device::exists): Declare.
	* devices.in (dev_storage): Replace former noexpose values with
	pointers to matching exists_XXX method.
	(device::exists_never): New method.
	(device::exists_ptys): New method.
	(device::exists_cons): New method.
	(device::exists_console): New method.
	(device::exists_nt_dev): New method.
	(device::exists): New method.
	* fhandler_dev.cc (fhandler_dev::readdir): Replace call to
	device::expose with call to device::exists and drop all further
	existence filtering since it's done in device::exists now.
	* path.cc (path_conv::check): Replace call to device::expose with call
	to device::exists.
2012-03-31 20:14:14 +00:00
Christopher Faylor 4303e52e4f update copyright 2012-03-31 17:38:40 +00:00
Christopher Faylor 1c1294b4ce (Interim checkin while we work on this)
* devices.cc: Regenerate.
* devices.h (device::noexpose): New field.
(device::dev_on_fs): Make a bit field.
(get_major): Use proper type for declaration.
(expose): New field.
(ext_dev_storage): Delete declaration.
(dev_storage_size): Ditto.
(dev_storage): New declaration.
(dev_storage_end): Ditto.
* devices.in: Mark /dev/ptym*, /dev/com*, /dev/pipe, /dev/fifo, and "/dev" as
"no expose".
* fhandler.h (fhandler_dev::lastrealpos): Delete declaration.
(fhandler_dev::devidx): Declare new field.
* fhandler_disk_file.cc: Move fhandler_dev functions into fhandler_dev.cc.
* fhandler_dev.cc: Add includes needed for functions moved from
fhandler_disk_file.cc.
(dev_storage_scan_start): Define place to start listing devices.
(dev_storage_size): Define size of array to scan.
(fhandler_dev::fhandler_dev): Move here from fhandler_disk_file.cc.
(fhandler_dev::opendir): Ditto.
(fhandler_dev::readdir): Just check devidx for non-NULL to determine when to go
to disk for /dev content.  Use dev_storage rather than ext_dev_storage.
Iterate over dev_storage using devidx pointer.  Use accessor functions rather
than raw references to the device struct.  Only increment dir->__d_position
when we are actually going to be returning something.  Add debug_printf for
exit.
(fhandler_dev::rewinddir): Set devidx as appropriate depending on whether
there's a /dev on disk or not.
* gendevices: Don't mark dev_storage static but do put it in the _RDATA
section.
* path.cc (path_conv::check): Use new "device::expose()" function to decide to
forbid programs from referencing internal device types.
2012-03-31 17:38:00 +00:00
Corinna Vinschen 54440304b3 Fix typo 2012-03-30 13:28:17 +00:00
Corinna Vinschen 4ceddd6276 *** empty log message *** 2012-03-30 13:27:38 +00:00
Corinna Vinschen e612307024 * cygwinenv.sgml (cygwinenv-implemented-options): Add detect_bloda.
* new-features.sgml (ov-new1.7.12): Add list items for the change to
	flock and the detect_bloda CYGWIN option.
	* overview2.sgml (ov-hi-process-problems): Add a reference to the
	detect_bloda CYGWIN option.
2012-03-30 11:30:13 +00:00
Corinna Vinschen 8a92f14092 * posix.sgml (std-notes): Change description of flock restrictions. 2012-03-30 11:29:57 +00:00
Corinna Vinschen a918afd703 * devices.h (DEV_TTY_MAJOR): Define, use throughout where appropriate.
(DEV_VIRTFS_MAJOR): Ditto.
	* fhandler_dev.cc (fhandler_dev::readdir): Add comments.  Tweak tests
	for invisible devices.  Don't print comX devices, only ttySX.  Drop
	requirement to call stat64.
2012-03-30 09:26:45 +00:00
Corinna Vinschen 9ae37ea0c6 * libc/locale/locale.c (__mb_cur_max): On Cygwin, align default value
with default UTF-8 charset.
2012-03-29 20:27:15 +00:00
Corinna Vinschen 6e4ac6e81c *** empty log message *** 2012-03-29 18:24:45 +00:00
Corinna Vinschen b255aece50 * new-features.sgml (ov-new1.7.12): Create. Move mountinfo here.
Add /dev notice.
	* pathnames.sgml (pathnames-posixdevices): Rephrase to account for
	/dev change in 1.7.12.
2012-03-29 18:23:32 +00:00
Corinna Vinschen 9ca7bca3c3 * Makefile.in (DLL_OFILES): Add fhandler_dev.o.
* devices.h (DEV_DEV_MAJOR): Define.
	(FH_DEV): Redefine in terms of DEV_DEV_MAJOR.
	(ext_dev_storage): Declare.
	(dev_storage_size): Declare.
	(dev_dev_storage): Declare.
	(dev_dev): Define.
	(isdev_dev): Define.
	* devices.in (dev_dev_storage): Activate.
	(ext_dev_storage): Define as externally available pointer to
	dev_storage.
	(dev_storage_size): Define to contain number of dev_storage elements.
	* dir.cc (rmdir): Handle /dev as always not empty.
	* dtable.cc (fh_alloc): Handle DEV_DEV_MAJOR.
	* fhandler.h (fhandler_dev): New class, derived from fhandler_disk_file.
	(fhandler_union): Add fhandler_dev member.
	* fhandler_disk_file.cc (class __DIR_mounts): Handle /dev directory
	to make sure it always exists.
	* fhandler_dev.cc: New file implementing /dev.
	* globals.cc (ro_u_dev): New R/O unicode string.
	* path.cc (path_conv::check): Handle FH_DEV device.
2012-03-29 18:02:54 +00:00