* [PATCH][AArch64] Fix elf_greg_t on ILP32
@ 2017-08-23 17:21 Szabolcs Nagy
2017-08-29 15:01 ` Szabolcs Nagy
0 siblings, 1 reply; 4+ messages in thread
From: Szabolcs Nagy @ 2017-08-23 17:21 UTC (permalink / raw)
To: GNU C Library; +Cc: nd
[-- Attachment #1: Type: text/plain, Size: 259 bytes --]
Use uint64_t instead of unsigned long.
will commit it tomorrow if there are no objections.
ChangleLog:
2017-08-23 Szabolcs Nagy <szabolcs.nagy@arm.com>
* sysdeps/unix/sysv/linux/aarch64/sys/procfs.h (elf_greg_t):
Use uint64_t instead of unsigned long.
[-- Attachment #2: greg.diff --]
[-- Type: text/x-patch, Size: 608 bytes --]
diff --git a/sysdeps/unix/sysv/linux/aarch64/sys/procfs.h b/sysdeps/unix/sysv/linux/aarch64/sys/procfs.h
index 7a7b1d0742..5c96bc5f17 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sys/procfs.h
@@ -32,11 +32,12 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/user.h>
+#include <stdint.h>
__BEGIN_DECLS
/* Type for a general-purpose register. */
-typedef unsigned long elf_greg_t;
+typedef uint64_t elf_greg_t;
/* And the whole bunch of them. We could have used `struct
pt_regs' directly in the typedef, but tradition says that
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][AArch64] Fix elf_greg_t on ILP32
2017-08-23 17:21 [PATCH][AArch64] Fix elf_greg_t on ILP32 Szabolcs Nagy
@ 2017-08-29 15:01 ` Szabolcs Nagy
2017-08-29 15:20 ` Zack Weinberg
0 siblings, 1 reply; 4+ messages in thread
From: Szabolcs Nagy @ 2017-08-29 15:01 UTC (permalink / raw)
To: GNU C Library; +Cc: nd
On 23/08/17 18:21, Szabolcs Nagy wrote:
> Use uint64_t instead of unsigned long.
>
> will commit it tomorrow if there are no objections.
>
> ChangleLog:
> 2017-08-23 Szabolcs Nagy <szabolcs.nagy@arm.com>
>
> * sysdeps/unix/sysv/linux/aarch64/sys/procfs.h (elf_greg_t):
> Use uint64_t instead of unsigned long.
>
hm sys/procfs.h is included into signal.h
via sys/ucontext.h, where stdint.h should
not be exposed..
this does not happen in standards conforming
mode, but happens with _DEFAULT_SOURCE==1 so
it may cause problems.
i'm not sure if this is ok or better use
unsigned long long instead of uint64_t
(preferred uint64_t to avoid changing the
type on lp64)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][AArch64] Fix elf_greg_t on ILP32
2017-08-29 15:01 ` Szabolcs Nagy
@ 2017-08-29 15:20 ` Zack Weinberg
2017-08-29 15:42 ` Szabolcs Nagy
0 siblings, 1 reply; 4+ messages in thread
From: Zack Weinberg @ 2017-08-29 15:20 UTC (permalink / raw)
To: Szabolcs Nagy; +Cc: GNU C Library, nd
On Tue, Aug 29, 2017 at 11:00 AM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
> On 23/08/17 18:21, Szabolcs Nagy wrote:
>> Use uint64_t instead of unsigned long.
>>
>> will commit it tomorrow if there are no objections.
>>
>> ChangleLog:
>> 2017-08-23 Szabolcs Nagy <szabolcs.nagy@arm.com>
>>
>> * sysdeps/unix/sysv/linux/aarch64/sys/procfs.h (elf_greg_t):
>> Use uint64_t instead of unsigned long.
>>
>
> hm sys/procfs.h is included into signal.h
> via sys/ucontext.h, where stdint.h should
> not be exposed..
sys/procfs.h already includes sys/types.h, so use __uint64_t.
Why does sys/ucontext.h need to include sys/procfs.h?
zw
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][AArch64] Fix elf_greg_t on ILP32
2017-08-29 15:20 ` Zack Weinberg
@ 2017-08-29 15:42 ` Szabolcs Nagy
0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2017-08-29 15:42 UTC (permalink / raw)
To: Zack Weinberg; +Cc: nd, GNU C Library
On 29/08/17 16:20, Zack Weinberg wrote:
> On Tue, Aug 29, 2017 at 11:00 AM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
>> On 23/08/17 18:21, Szabolcs Nagy wrote:
>>> Use uint64_t instead of unsigned long.
>>>
>>> will commit it tomorrow if there are no objections.
>>>
>>> ChangleLog:
>>> 2017-08-23 Szabolcs Nagy <szabolcs.nagy@arm.com>
>>>
>>> * sysdeps/unix/sysv/linux/aarch64/sys/procfs.h (elf_greg_t):
>>> Use uint64_t instead of unsigned long.
>>>
>>
>> hm sys/procfs.h is included into signal.h
>> via sys/ucontext.h, where stdint.h should
>> not be exposed..
>
> sys/procfs.h already includes sys/types.h, so use __uint64_t.
>
ah thanks, that works.
> Why does sys/ucontext.h need to include sys/procfs.h?
>
it defines elf_*_t which is used in ucontext.h as
#ifdef __USE_MISC
# include <sys/procfs.h>
typedef elf_greg_t greg_t;
/* Container for all general registers. */
typedef elf_gregset_t gregset_t;
/* Structure to describe FPU registers. */
typedef elf_fpregset_t fpregset_t;
#endif
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-29 15:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 17:21 [PATCH][AArch64] Fix elf_greg_t on ILP32 Szabolcs Nagy
2017-08-29 15:01 ` Szabolcs Nagy
2017-08-29 15:20 ` Zack Weinberg
2017-08-29 15:42 ` Szabolcs Nagy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).