mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
* scripts/abilist.awk: If variable `parse_names' is set, grok the file
header lines and write out foo.symlist files for each foo.so.NN listed. * libio/libioP.h (_IO_wfile_jumps): Remove attribute_hidden. This symbol is exported, and we don't want to hide it. Add libc_hidden_proto instead. (_IO_file_jumps): Add libc_hidden_proto. * libio/wfileops.c (_IO_wfile_jumps): Add libc_hidden_data_def. Remove INTVARDEF. * libio/fileops.c (_IO_file_jumps): Likewise. * libio/stdfiles.c: Don't use INTUSE on them. * libio/iofdopen.c (_IO_new_fdopen): Likewise. * libio/iofopen.c (__fopen_internal): Likewise. * libio/freopen.c (freopen): Likewise. * libio/freopen64.c (freopen64): Likewise. * libio/iovdprintf.c (_IO_vdprintf): Likewise.
This commit is contained in:
parent
fd54683c97
commit
15a686af58
17
ChangeLog
17
ChangeLog
@ -1,5 +1,22 @@
|
||||
2003-03-27 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* scripts/abilist.awk: If variable `parse_names' is set, grok the file
|
||||
header lines and write out foo.symlist files for each foo.so.NN listed.
|
||||
|
||||
* libio/libioP.h (_IO_wfile_jumps): Remove attribute_hidden.
|
||||
This symbol is exported, and we don't want to hide it.
|
||||
Add libc_hidden_proto instead.
|
||||
(_IO_file_jumps): Add libc_hidden_proto.
|
||||
* libio/wfileops.c (_IO_wfile_jumps): Add libc_hidden_data_def.
|
||||
Remove INTVARDEF.
|
||||
* libio/fileops.c (_IO_file_jumps): Likewise.
|
||||
* libio/stdfiles.c: Don't use INTUSE on them.
|
||||
* libio/iofdopen.c (_IO_new_fdopen): Likewise.
|
||||
* libio/iofopen.c (__fopen_internal): Likewise.
|
||||
* libio/freopen.c (freopen): Likewise.
|
||||
* libio/freopen64.c (freopen64): Likewise.
|
||||
* libio/iovdprintf.c (_IO_vdprintf): Likewise.
|
||||
|
||||
* Makerules (check-abi) [$(enable-check-abi) = warn]:
|
||||
Ignore exit status from diff.
|
||||
* configure.in (enable_check_abi): Document possible value "warn".
|
||||
|
@ -457,7 +457,7 @@ _IO_file_setbuf_mmap (fp, p, len)
|
||||
_IO_FILE *result;
|
||||
|
||||
/* Change the function table. */
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &INTUSE(_IO_file_jumps);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps;
|
||||
fp->_wide_data->_wide_vtable = &_IO_wfile_jumps;
|
||||
|
||||
/* And perform the normal operation. */
|
||||
@ -709,7 +709,7 @@ mmap_remap_check (_IO_FILE *fp)
|
||||
fp->_IO_buf_base = fp->_IO_buf_end = NULL;
|
||||
_IO_setg (fp, NULL, NULL, NULL);
|
||||
if (fp->_mode <= 0)
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &INTUSE(_IO_file_jumps);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps;
|
||||
else
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_wfile_jumps;
|
||||
fp->_wide_data->_wide_vtable = &_IO_wfile_jumps;
|
||||
@ -802,7 +802,7 @@ decide_maybe_mmap (_IO_FILE *fp)
|
||||
/* We couldn't use mmap, so revert to the vanilla file operations. */
|
||||
|
||||
if (fp->_mode <= 0)
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &INTUSE(_IO_file_jumps);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps;
|
||||
else
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_wfile_jumps;
|
||||
fp->_wide_data->_wide_vtable = &_IO_wfile_jumps;
|
||||
@ -1587,7 +1587,7 @@ struct _IO_jump_t _IO_file_jumps =
|
||||
JUMP_INIT(showmanyc, _IO_default_showmanyc),
|
||||
JUMP_INIT(imbue, _IO_default_imbue)
|
||||
};
|
||||
INTVARDEF(_IO_file_jumps)
|
||||
libc_hidden_data_def (_IO_file_jumps)
|
||||
|
||||
struct _IO_jump_t _IO_file_jumps_mmap =
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 1993,95,96,97,98,2000,2001,2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,95,96,97,98,2000,2001,2002,2003
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -67,9 +68,9 @@ freopen (filename, mode, fp)
|
||||
#endif
|
||||
{
|
||||
INTUSE(_IO_file_close_it) (fp);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &INTUSE(_IO_file_jumps);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps;
|
||||
if (fp->_vtable_offset == 0 && fp->_wide_data != NULL)
|
||||
fp->_wide_data->_wide_vtable = &INTUSE(_IO_wfile_jumps);
|
||||
fp->_wide_data->_wide_vtable = &_IO_wfile_jumps;
|
||||
result = INTUSE(_IO_file_fopen) (fp, filename, mode, 1);
|
||||
if (result != NULL)
|
||||
result = __fopen_maybe_mmap (result);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,1995,1996,1997,1998,2000,2001,2002
|
||||
/* Copyright (C) 1993,1995,1996,1997,1998,2000,2001,2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -53,9 +53,9 @@ freopen64 (filename, mode, fp)
|
||||
filename = fd_to_filename (fd);
|
||||
}
|
||||
INTUSE(_IO_file_close_it) (fp);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &INTUSE(_IO_file_jumps);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps;
|
||||
if (fp->_vtable_offset == 0 && fp->_wide_data != NULL)
|
||||
fp->_wide_data->_wide_vtable = &INTUSE(_IO_wfile_jumps);
|
||||
fp->_wide_data->_wide_vtable = &_IO_wfile_jumps;
|
||||
result = INTUSE(_IO_file_fopen) (fp, filename, mode, 0);
|
||||
if (result != NULL)
|
||||
result = __fopen_maybe_mmap (result);
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 1993,1994,1997-1999,2000,2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1994,1997,1998,1999,2000,2002,2003
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -152,12 +153,12 @@ _IO_new_fdopen (fd, mode)
|
||||
(use_mmap && (read_write & _IO_NO_WRITES))
|
||||
? &_IO_wfile_jumps_maybe_mmap :
|
||||
#endif
|
||||
&INTUSE(_IO_wfile_jumps));
|
||||
&_IO_wfile_jumps);
|
||||
_IO_JUMPS (&new_f->fp) =
|
||||
#ifdef _G_HAVE_MMAP
|
||||
(use_mmap && (read_write & _IO_NO_WRITES)) ? &_IO_file_jumps_maybe_mmap :
|
||||
#endif
|
||||
&INTUSE(_IO_file_jumps);
|
||||
&_IO_file_jumps;
|
||||
INTUSE(_IO_file_init) (&new_f->fp);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
new_f->fp.vtable = NULL;
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 1993,1997,1998,1999,2000,2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1997,1998,1999,2000,2002,2003
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -80,11 +81,11 @@ __fopen_internal (filename, mode, is32)
|
||||
new_f->fp.file._lock = &new_f->lock;
|
||||
#endif
|
||||
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
|
||||
_IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, &INTUSE(_IO_wfile_jumps));
|
||||
_IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, &_IO_wfile_jumps);
|
||||
#else
|
||||
_IO_no_init (&new_f->fp.file, 1, 0, NULL, NULL);
|
||||
#endif
|
||||
_IO_JUMPS (&new_f->fp) = &INTUSE(_IO_file_jumps);
|
||||
_IO_JUMPS (&new_f->fp) = &_IO_file_jumps;
|
||||
INTUSE(_IO_file_init) (&new_f->fp);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
new_f->fp.vtable = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1997-2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1997-2000,2001,2002,2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -41,8 +41,8 @@ _IO_vdprintf (d, format, arg)
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
tmpfil.file._lock = NULL;
|
||||
#endif
|
||||
_IO_no_init (&tmpfil.file, _IO_USER_LOCK, 0, &wd, &INTUSE(_IO_wfile_jumps));
|
||||
_IO_JUMPS (&tmpfil) = &INTUSE(_IO_file_jumps);
|
||||
_IO_no_init (&tmpfil.file, _IO_USER_LOCK, 0, &wd, &_IO_wfile_jumps);
|
||||
_IO_JUMPS (&tmpfil) = &_IO_file_jumps;
|
||||
INTUSE(_IO_file_init) (&tmpfil);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
tmpfil.vtable = NULL;
|
||||
|
@ -450,9 +450,11 @@ extern int _IO_default_showmanyc __P ((_IO_FILE *));
|
||||
extern void _IO_default_imbue __P ((_IO_FILE *, void *));
|
||||
|
||||
extern struct _IO_jump_t _IO_file_jumps;
|
||||
libc_hidden_proto (_IO_file_jumps)
|
||||
extern struct _IO_jump_t _IO_file_jumps_mmap attribute_hidden;
|
||||
extern struct _IO_jump_t _IO_file_jumps_maybe_mmap attribute_hidden;
|
||||
extern struct _IO_jump_t _IO_wfile_jumps attribute_hidden;
|
||||
extern struct _IO_jump_t _IO_wfile_jumps;
|
||||
libc_hidden_proto (_IO_wfile_jumps)
|
||||
extern struct _IO_jump_t _IO_wfile_jumps_mmap attribute_hidden;
|
||||
extern struct _IO_jump_t _IO_wfile_jumps_maybe_mmap attribute_hidden;
|
||||
extern struct _IO_jump_t _IO_old_file_jumps attribute_hidden;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993-1997,1999,2000,2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993-1997,1999,2000,2002,2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -39,30 +39,30 @@
|
||||
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
|
||||
static struct _IO_wide_data _IO_wide_data_##FD \
|
||||
= { ._wide_vtable = &INTUSE(_IO_wfile_jumps) }; \
|
||||
= { ._wide_vtable = &_IO_wfile_jumps }; \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
|
||||
&INTUSE(_IO_file_jumps)};
|
||||
&_IO_file_jumps};
|
||||
# else
|
||||
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \
|
||||
&INTUSE(_IO_file_jumps)};
|
||||
&_IO_file_jumps};
|
||||
# endif
|
||||
#else
|
||||
# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
|
||||
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
static struct _IO_wide_data _IO_wide_data_##FD \
|
||||
= { ._wide_vtable = &INTUSE(_IO_wfile_jumps) }; \
|
||||
= { ._wide_vtable = &_IO_wfile_jumps }; \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
|
||||
&INTUSE(_IO_file_jumps)};
|
||||
&_IO_file_jumps};
|
||||
# else
|
||||
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \
|
||||
&INTUSE(_IO_file_jumps)};
|
||||
&_IO_file_jumps};
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,95,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,95,97,98,99,2000,2001,2002, 2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Ulrich Drepper <drepper@cygnus.com>.
|
||||
Based on the single byte version by Per Bothner <bothner@cygnus.com>.
|
||||
@ -879,7 +879,7 @@ struct _IO_jump_t _IO_wfile_jumps =
|
||||
JUMP_INIT(showmanyc, _IO_default_showmanyc),
|
||||
JUMP_INIT(imbue, _IO_default_imbue)
|
||||
};
|
||||
INTVARDEF(_IO_wfile_jumps)
|
||||
libc_hidden_data_def (_IO_wfile_jumps)
|
||||
|
||||
|
||||
struct _IO_jump_t _IO_wfile_jumps_mmap =
|
||||
|
@ -1,6 +1,27 @@
|
||||
# This awk script processes the output of objdump --dynamic-syms
|
||||
# into a simple format that should not change when the ABI is not changing.
|
||||
|
||||
BEGIN {
|
||||
if (parse_names)
|
||||
out = "/dev/stderr";
|
||||
else
|
||||
out = "/dev/stdout";
|
||||
}
|
||||
|
||||
# Per-file header.
|
||||
/[^ :]+\.so\.[0-9]+:[ ]+.file format .*$/ {
|
||||
if (parse_names && soname != "")
|
||||
emit(1);
|
||||
|
||||
sofullname = $1;
|
||||
sub(/:$/, "", sofullname);
|
||||
soname = sofullname;
|
||||
sub(/^.*\//, "", soname);
|
||||
sub(/\.so\.[0-9]+$/, "", soname);
|
||||
|
||||
next
|
||||
}
|
||||
|
||||
# Normalize columns.
|
||||
/^[0-9a-fA-F]+ / { sub(/ /, " - ") }
|
||||
|
||||
@ -41,11 +62,11 @@ $2 == "g" || $2 == "w" && NF == 7 {
|
||||
size = "";
|
||||
}
|
||||
else {
|
||||
print symbol, version, weak, "?", type, $4, $5;
|
||||
print symbol, version, weak, "?", type, $4, $5 >> out;
|
||||
next;
|
||||
}
|
||||
if (size == " 0x") {
|
||||
print symbol, version, weak, "?", type, $4, $5;
|
||||
print symbol, version, weak, "?", type, $4, $5 >> out;
|
||||
next;
|
||||
}
|
||||
|
||||
@ -66,10 +87,20 @@ $2 == "g" || $2 == "w" && NF == 7 {
|
||||
NF == 0 || /DYNAMIC SYMBOL TABLE/ || /file format/ { next }
|
||||
|
||||
{
|
||||
print "Don't grok this line:", $0
|
||||
print "Don't grok this line:", $0 >> out
|
||||
}
|
||||
|
||||
END {
|
||||
function emit(tofile) {
|
||||
if (tofile) {
|
||||
out = prefix soname ".symlist";
|
||||
if (soname in outfiles)
|
||||
out = out "." ++outfiles[soname];
|
||||
else
|
||||
outfiles[soname] = 1;
|
||||
}
|
||||
else
|
||||
out = "/dev/stdout";
|
||||
|
||||
nverlist = 0;
|
||||
for (version in versions) {
|
||||
if (nverslist == 0) {
|
||||
@ -102,9 +133,22 @@ END {
|
||||
for (i = 1; i <= nverslist; ++i) {
|
||||
version = order[i];
|
||||
|
||||
print version;
|
||||
outpipe = "sort";
|
||||
print version >> out;
|
||||
outpipe = "sort >> " out;
|
||||
print versions[version] | outpipe;
|
||||
close(outpipe);
|
||||
|
||||
delete versions[version];
|
||||
}
|
||||
|
||||
if (tofile)
|
||||
print "wrote", out, "for", sofullname;
|
||||
}
|
||||
|
||||
END {
|
||||
if (! parse_names)
|
||||
emit(0);
|
||||
else if (soname != "") {
|
||||
emit(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user