* elf/elf.h (ELF64_R_INFO): Cast sym value to Elf64_Xword before
	shifting.
This commit is contained in:
Ulrich Drepper 2000-06-02 00:27:08 +00:00
parent 61d655c1cb
commit 68979757bc
5 changed files with 69 additions and 43 deletions

View File

@ -1,5 +1,8 @@
2000-06-01 Ulrich Drepper <drepper@redhat.com>
* elf/elf.h (ELF64_R_INFO): Cast sym value to Elf64_Xword before
shifting.
* sysdeps/i386/elf/setjmp.S: Work around change is recent
binutils. gas now emits a jump through the PLT instead of a
relative jump if the jump target is an exported symbol.

View File

@ -476,7 +476,7 @@ typedef struct
#define ELF64_R_SYM(i) ((i) >> 32)
#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
#define ELF64_R_INFO(sym,type) (((sym) << 32) + (type))
#define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type))
/* Program segment header. */

View File

@ -51,7 +51,7 @@ These @code{typedef}s are in @file{stdint.h}.
If you require that an integer be represented in exactly N bits, use one
of the following types, with the obvious mapping to bit size and signedness:
@itemize
@itemize @bullet
@item int8_t
@item int16_t
@item int32_t
@ -68,7 +68,7 @@ size, the corresponding above type does not exist.
If you don't need a specific storage size, but want the smallest data
structure with @emph{at least} N bits, use one of these:
@itemize
@itemize @bullet
@item int8_least_t
@item int16_least_t
@item int32_least_t
@ -84,7 +84,7 @@ that allows the fastest access while having at least N bits (and
among data structures with the same access speed, the smallest one), use
one of these:
@itemize
@itemize @bullet
@item int8_fast_t
@item int16_fast_t
@item int32_fast_t
@ -100,7 +100,7 @@ which it is being used, use one of the following. If you use these,
you should write code that takes into account the variable size and range
of the integer.
@itemize
@itemize @bullet
@item intmax_t
@item uintmax_t
@end itemize

View File

@ -154,7 +154,7 @@ grows, but doesn't shrink when the stack shrinks.
@node Memory Allocation
@section Allocating Storage For a Program's Data
@section Allocating Storage For Program Data
This section covers how ordinary programs manage storage for their data,
including the famous @code{malloc} function and some fancier facilities
@ -280,8 +280,7 @@ any time (or never).
block and clear it.
* Efficiency and Malloc:: Efficiency considerations in use of
these functions.
* Aligned Memory Blocks:: Allocating specially aligned memory:
@code{memalign} and @code{valloc}.
* Aligned Memory Blocks:: Allocating specially aligned memory.
* Malloc Tunable Parameters:: Use @code{mallopt} to adjust allocation
parameters.
* Heap Consistency Checking:: Automatic checking for errors.
@ -383,8 +382,8 @@ The block that @code{malloc} gives you is guaranteed to be aligned so
that it can hold any type of data. In the GNU system, the address is
always a multiple of eight on most systems, and a multiple of 16 on
64-bit systems. Only rarely is any higher boundary (such as a page
boundary) necessary; for those cases, use @code{memalign} or
@code{valloc} (@pxref{Aligned Memory Blocks}).
boundary) necessary; for those cases, use @code{memalign},
@code{posix_memalign} or @code{valloc} (@pxref{Aligned Memory Blocks}).
Note that the memory located after the end of the block is likely to be
in use for something else; perhaps a block already allocated by another
@ -617,12 +616,13 @@ after calling @code{free} wastes memory. The size threshold for
The address of a block returned by @code{malloc} or @code{realloc} in
the GNU system is always a multiple of eight (or sixteen on 64-bit
systems). If you need a block whose address is a multiple of a higher
power of two than that, use @code{memalign} or @code{valloc}. These
functions are declared in @file{stdlib.h}.
power of two than that, use @code{memalign}, @code{posix_memalign}, or
@code{valloc}. These functions are declared in @file{stdlib.h}.
With the GNU library, you can use @code{free} to free the blocks that
@code{memalign} and @code{valloc} return. That does not work in BSD,
however---BSD does not provide any way to free such blocks.
@code{memalign}, @code{posix_memalign}, and @code{valloc} return. That
does not work in BSD, however---BSD does not provide any way to free
such blocks.
@comment malloc.h stdlib.h
@comment BSD
@ -634,6 +634,22 @@ somewhat larger block, and then returning an address within the block
that is on the specified boundary.
@end deftypefun
@comment stdlib.h
@comment POSIX
@deftypefun int posix_memalign (void **@var{memptr}, size_t @var{alignment}, size_t @var{size})
The @code{posix_memalign} function is similar to the @code{memalign}
function in that it returns a buffer of @var{size} bytes aligned to a
multiple of @var{alignment}. But it adds one requirement to the
parameter @var{alignment}: the value must be a power of two multiple of
@code{sizeof (void *)}.
If the function succeeds in allocation memory a pointer to the allocated
memory is returned in @code{*@var{memptr}} and the return value is zero.
Otherwise the function returns an error value indicating the problem.
This function was introduced in POSIX 1003.1d.
@end deftypefun
@comment malloc.h stdlib.h
@comment BSD
@deftypefun {void *} valloc (size_t @var{size})
@ -790,6 +806,14 @@ immediately. This can be useful because otherwise a crash may happen
much later, and the true cause for the problem is then very hard to
track down.
There is one problem with @code{MALLOC_CHECK_}: in SUID or SGID binaries
it could possibly be exploited since diverging from the normal programs
behaviour it now writes something to the standard error desriptor.
Therefore the use of @code{MALLOC_CHECK_} is disabled by default for
SUID and SGID binaries. It can be enabled again by the system
administrator by adding a file @file{/etc/suid-debug} (the content is
not important it could be empty).
So, what's the difference between using @code{MALLOC_CHECK_} and linking
with @samp{-lmcheck}? @code{MALLOC_CHECK_} is orthogonal with respect to
@samp{-lmcheck}. @samp{-lmcheck} has been added for backward

View File

@ -919,7 +919,7 @@ The file system type @var{fstype} is not known to the kernel.
The file @var{dev} is not a block device special file.
@item EBUSY
@itemize
@itemize @bullet
@item
The device is already mounted.
@ -933,7 +933,7 @@ The request is to remount read-only, but there are files open for write.
@end itemize
@item EINVAL
@itemize
@itemize @bullet
@item
A remount was attempted, but there is no filesystem mounted over the
@ -945,7 +945,7 @@ The supposed filesystem has an invalid superblock.
@end itemize
@item EACCESS
@itemize
@itemize @bullet
@item
The filesystem is inherently read-only (possibly due to a switch on the
@ -1190,4 +1190,3 @@ parameters are:
@item
@code{bdflush}
@end itemize