Hi!
I've got the situation, that the function strlen() occurs twice in libc.a
(building newlib for ARM-V7a and Size-Optimized).
In newlib/libc/machine/arm/strlen.c there are the pre-processor stetements ...
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
(defined (__thumb__) && !defined (__thumb2__))
/*...*/
#else
#if !(defined(_ISA_ARM_7) || defined(__ARM_ARCH_6T2__))
/*...*/
#endif
and in newlib/libc/machine/arm/strlen-armv7.S the "exclude" begins with
/* NOTE: This ifdef MUST match the ones in arm/strlen.c
We fallback to the one in arm/strlen.c for size optimised or
for older architectures. */
#if defined(_ISA_ARM_7) || defined(__ARM_ARCH_6T2__) && \
!(defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
(defined (__thumb__) && !defined (__thumb2__)))
But this is not completely contrary to arm/strlen.c (see above)!
To fix the logical statement in arm/strlen-armv7.S there are parentheses needed
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc (format_proc_cpuinfo): Only fetch group relations,
we don't need anything else.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* winsup.h (_WIN32_WINNT): Set to 0x0a00 for Windows 10.
(WINVER): Ditto. Remove outdated comment.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
System DLLs are always first in the DLL search order so
http://www.microsoft.com/technet/security/advisory/2269637.mspx
doesn't apply for them.
* autoload.cc (std_dll_init): Revert using full paths to system DLLs.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This fixes a long-standing problem when GetProcAddress fails
to load a function. The noload code calls SetLastError on
i686 without saving the edx register. Starting with Windows 7,
SetLastError apparently uses $edx and the register is set to
0x00000000 on return. So the subsequent `jmp *$edx' in noload
supposed to return to the caller, actually jumps to address NULL,
which results in a SEGV.
* autoload.cc (noload): i686 only: Save and restore $edx when calling
SetLastError to avoid clobbering return address stating with Windows 7.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Update the ARM copyright notice to include 2015.
2015-08-20 Andre Vieira <andre.simoesdiasvieira@arm.com>
* COPYING.NEWLIB: Updated ARM's copyright notice.
From 913be92b12851bc6285b8ab77d6878fda613f77c Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Thu, 20 Aug 2015 14:16:42 +0100
Subject: [PATCH] Updated general Copyright notice
Hi,
As I mentioned recently [1], newlib is providing a "kill" symbol to link
against, without declaring "kill" in signal.h. This is confusing for the
libgfortran build, which tries to link against kill (which succeeds), then
tries to use it (which triggers -Werror=implicit-function-declaration).
This patch implements my suggestion in that thread - making the declaration
of 'kill' in libc/include/sys/signal.h unconditional.
I've tested this by building a modified libgfortran on AArch64/ARM to see
that the Werror goes away, and the libgfortran build succeeds.
Is something like this OK for newlib? If so, can someone please commit
it on my behalf, as I have no commit access here.
Otherwise, what is your preferred direction for me to take this patch?
Thanks,
James
2015-08-18 Jon Turney <jon.turney@dronecode.org.uk>
* faq-using.xml (faq.using.bloda): Add Lavasoft Web Companion to
BLODA list.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
On 11/08/2015 11:08, Andre Vieira wrote:
> On 10/08/15 14:38, Jon TURNEY wrote:
>> On 07/08/2015 11:13, Andre Vieira wrote:
>>> Building the manuals on Ubuntu LTS 14.04 (64-bit) using pdfTeX
>>> 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) is failing with the
>>> following error:
>>> "Transcript written on libc.log.
>>> /usr/bin/texi2dvi: pdfetex exited with bad status, quitting."
>>>
>>> libc.log complaints about the following:
>>>
>>> You can't use `@unskip' in vertical mode.
>>>
[...]
>>>
>>> This code has been around for a while, so it might have to do with a
>>> change in pdfTex?
So it seems this problem has been around for a while, and looks like it
is due to a change in texi2dvi in texinfo 5.0 or late 4.x, see [1].
I guess it's not very noticeable since it only occurs when doing 'make
dvi', which doesn't happen by default.
Attached is a different and perhaps cleaner workaround to the one in
that thread.
[1] https://sourceware.org/ml/newlib/2013/msg00057.html
From 4d386b5900b6c68e022004b447faa696be5ff8c7 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Tue, 11 Aug 2015 14:46:39 +0100
Subject: [PATCH] Use '@sp 1' rather than '@*' to workaround a change in
texi2dvi.
Since about TexInfo 5.0, using '@*' immediately after a table causes a 'You
can't use `@unskip' in vertical mode' error.
See https://sourceware.org/ml/newlib/2013/msg00057.html
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
On 31/07/15 10:34, Richard Earnshaw wrote:
> On 31/07/15 10:28, Andre Vieira wrote:
>> newlib/ChangeLog:
>> 2015-07-28 Andre Vieira <andre.simoesdiasvieira@arm.com>
>>
>> * libc/sys/arm/sys/param.h: Include machine/param.h
>> (HZ, NOFILE, PATHSIZE): Define.
>>
>> param_refactor_1.patch
>>
>>
>> From abc2d5f3398721f6ca891b9581feaba58730b19c Mon Sep 17 00:00:00 2001
>> From: Andre Simoes Dias Vieira <andsim01@arm.com>
>> Date: Tue, 28 Jul 2015 12:10:59 +0100
>> Subject: [PATCH 1/2] Moved param configuration to machine/param.h
>>
>> ---
>> newlib/libc/sys/arm/sys/param.h | 12 ++++++++++--
>> 1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/newlib/libc/sys/arm/sys/param.h b/newlib/libc/sys/arm/sys/param.h
>> index adc066e9a8756e07edaaa8cadc79b5f05c996ac9..622c371972ab3c9dbb93ea5c51323a593e2a171a 100644
>> --- a/newlib/libc/sys/arm/sys/param.h
>> +++ b/newlib/libc/sys/arm/sys/param.h
>> @@ -3,9 +3,17 @@
>> #ifndef _SYS_PARAM_H
>> # define _SYS_PARAM_H
>>
>> -# define HZ (100)
>> -# define NOFILE (60)
>> +#include <machine/param.h>
>> +
>> +#ifndef HZ
>> +# define HZ (60)
>
> Why have you changed the value for HZ? It seems that, by convention,
> ARM boards have always used 100.
>
> R.
>
>> +#endif
>> +#ifndef NOFILE
>> +# define NOFILE>(60)
>> +#endif
>> +#ifndef PATHSIZE
>> # define PATHSIZE (1024)
>> +#endif
>>
>> #define BIG_ENDIAN 4321
>> #define LITTLE_ENDIAN 1234
>>
>
Hi Richard,
ARM's machine/param.h that is included in "#include <machine/param.h>",
before the 'ifndef' already defines HZ to be 100. This file was already
there, it was just not being used. I understand that this 'ifndef' might
be confusing, though I decided to add it to mimic the behavior of the
default sys/param.h.
There is however an unrelated issue with this patch, a typo in the
"#define NOFILE" that crept in there due to some copy pasting when
splitting the patch.
Here is a fixed version.
BR,
Andre
newlib/ChangeLog:
2015-07-28 Andre Vieira <andre.simoesdiasvieira@arm.com>
* libc/sys/arm/sys/param.h: Include machine/param.h
(HZ, NOFILE, PATHSIZE): Define.
From abc2d5f3398721f6ca891b9581feaba58730b19c Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Tue, 28 Jul 2015 12:10:59 +0100
Subject: [PATCH 1/2] Moved param configuration to machine/param.h
* libc/include/sys/signal.h [__CYGWIN__]: include <sys/ucontext.h>
if compiling for POSIX.1-2008.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* grp.cc (internal_getgrfull): Drop asking caches. Explain why.
(internal_getgroups): In case we're not utilizing the Windows account
DBs, don't call LsaLookupSids but iterate over the group SIDs in the
token and call internal_getgrsid for each of them. Explain why.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Rearrange
to fall back to myself uid/gid in case we don't utilize Windows
account DBs, just as prior to 1.7.34.
* sec_helper.cc (cygpsid::get_id): Disable Samba user/group mapping per
RFC2307 if we're not utilizing Windows account DBs.
* security.cc (convert_samba_sd): Revert previous patch.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
When globals.cc has CRLF line endings, winsup.h is not removed, and
compilation fails for duplicate definitions.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base_overlapped::raw_write): When performing
nonblocking I/O, copy user space data into own buffer. Add longish
comment to explain why.
* fhandler.h (fhandler_base_overlapped::atomic_write_buf): New member.
(fhandler_base_overlapped::fhandler_base_overlapped): Initialize
atomic_write_buf.
(fhandler_base_overlapped::fhandler_base_overlapped): New destructor,
free'ing atomic_write_buf.
(fhandler_base_overlapped::copyto): Set atomic_write_buf to NULL in
copied fhandler.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Only try
to map user and group info per RFC2307 if account info is fetched
from Windows account DB.
(convert_samba_sd): Ditto.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* security,cc (get_attribute_from_acl): Merge all group perms into
user perms if user is member of group.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (GetLogicalProcessorInformationEx): Import.
(SetThreadGroupAffinity): Import.
* fhandler_proc.cc (add_size): New macro.
(get_msb): New inline function.
(mask_bits): Ditto.
(format_proc_cpuinfo): Drop handling of old CPUs. Check if we're
running on a OS version supporting porcessor groups. If so, use
SetThreadGroupAffinity to set thread affinity. Improve cache info
to include 3rd level cache on Intel CPUs. Improve multi core info.
* wincap.h (wincaps::has_processor_groups): New element.
* wincap.cc: Implement above element throughout.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Allow exceptions to be nested, which is especially useful with urgent
interrupts while processing an exception.
The implementation counts up the nesting level with each call to an
exception. In the outer exception (level 1), the exception stack is
started. All nested exceptions just reserve the redzone (scratch
memory that may be used by compiler) and exception context on the
stack, but then process on the same scratch.
Restriction: Impure pointers are shared among all exceptions. This may
be solved by creating an impure data structure in the stack frame with
each nested exception.
* or1k/crt0.S: Add exception nesting
* or1k/exceptions-asm.S: ditto
* or1k/util.c: ditto
Only on first call to the recursive malloc lock the restore value of
exception enable fields is stored.
* libc/sys/or1k/mlock.c: Fix exception enable saving
Improve FAQ answer on debugging Cygwin to mention the cygwin-debuginfo package
and the gdb command 'set cygwin-exceptions on'.
2015-08-03 Jon Turney <jon.turney@dronecode.org.uk>
* faq-programming.xml: Improve debugging-cygwin answer.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Fix documentation build since 6c2b1842 by not including stdio64 functions in the
reent syscalls menu if the node itself isn't going to be included because it's
under the STDIO64 flag.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Sorry, there was a typo in <sys/lock.h> which leads to memory corruption
since not enough space is reserved for the lock object.
newlib/ChangeLog
2015-07-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/sys/rtems/include/sys/lock.h (__LOCK_INIT_RECURSIVE): Use
proper type.
This is an optimized memset for AArch64. Memset is split into 4 main
cases: small sets of up to 16 bytes, medium of 16..96 bytes which are
fully unrolled. Large memsets of more than 96 bytes align the
destination and use an unrolled loop processing 64 bytes per
iteration. Memsets of zero of more than 256 use the dc zva
instruction, and there are faster versions for the common ZVA sizes 64
or 128. STP of Q registers is used to reduce codesize without loss of
performance.
https://cygwin.com/ml/cygwin/2015-07/msg00344.html:
RtlFillMemory and RtlCopyMemory only work for size values
up to 2GB. Fix this problem by using NetBSD code for
memset and memcpy. Add entry points for memmove, wmemset,
wmemmove, wmemcpy. Thanks to Roman Petrovski
<RPetrovski@illumina.com> for pointing this out.
* miscfuncs.cc (memset): x86_64 only: Implement in assembler.
(memmove,memcpy): x86_64 only: Ditto.
(wmemmove,wmemcpy): x86_64 only: Ditto.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
During libgcc build the first include search path for <...> is
"../newlib/libc/sys/rtems/include". Move all RTEMS specific header
files to "libc/sys/rtems/include" so that they can be found. Later
during libc build the header files in the previous location were somehow
present, but for libgcc build they were invisible. This change is
necessary to use <pthread.h> for the GCC thread model implementation.
newlib/ChangeLog
2015-07-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
libc/sys/rtems/machine/_types.h: Move to ...
libc/sys/rtems/include/machine/_types.h: ... here.
libc/sys/rtems/machine/limits.h: Move to ...
libc/sys/rtems/include/machine/limits.h: ... here.
libc/sys/rtems/machine/param.h: Move to ...
libc/sys/rtems/include/machine/param.h: ... here.
libc/sys/rtems/sys/cpuset.h: Move to ...
libc/sys/rtems/include/sys/cpuset.h: ... here.
libc/sys/rtems/sys/dirent.h: Move to ...
libc/sys/rtems/include/sys/dirent.h: ... here.
libc/sys/rtems/sys/param.h: Move to ...
libc/sys/rtems/include/sys/param.h: ... here.
libc/sys/rtems/sys/syslimits.h: Move to ...
libc/sys/rtems/include/sys/syslimits.h: ... here.
libc/sys/rtems/sys/utime.h: Move to ...
libc/sys/rtems/include/sys/utime.h: ... here.