mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 11:39:26 +08:00
* Makefile.in: Bump to version 1.92.
* version.c, Makefile.in: Get version string from Makefile. * copy.c, is-strip.c, not-strip.c, maybe-strip.c, Makefile.in: Make the same change that we earlier did for ar/ranlib: Generate two different binaries for strip and copy and use a global variable with different values to distinguish ostrip from copy. (-1 means to use argv[0] to decide, so you can get the old behavior, but it is no longer the default). * copy.c (copy_file): Set EXEC_P of output bfd if input is so. * copy.c (main): If is_strip==-1, compare last 5 chars of argv[0], not the whole path. * copy.c (main): Return 0, not 1. * copy.c (setup_sections): Fix due to change in bfd_make_section now failing if asked for a duplicate section. * strip.c, ostrip.c: Removed obsolete files. * ar.c, not-ranlib.c, maybe-ranlib.c: Change encoding of is_ranlib variable to be consistent with is_strip for strip.copy (i.e -1 to means use argv[0]).
This commit is contained in:
@ -41,6 +41,9 @@ strip.1
|
|||||||
is-ranlib.c
|
is-ranlib.c
|
||||||
not-ranlib.c
|
not-ranlib.c
|
||||||
maybe-ranlib.c
|
maybe-ranlib.c
|
||||||
|
is-strip.c
|
||||||
|
not-strip.c
|
||||||
|
maybe-strip.c
|
||||||
binutils.texi
|
binutils.texi
|
||||||
bucomm.c
|
bucomm.c
|
||||||
configure.in
|
configure.in
|
||||||
@ -53,12 +56,10 @@ i960-pinsn.c
|
|||||||
m68k-pinsn.c
|
m68k-pinsn.c
|
||||||
nm.c
|
nm.c
|
||||||
objdump.c
|
objdump.c
|
||||||
ostrip.c
|
|
||||||
ranlib.sh
|
ranlib.sh
|
||||||
README
|
README
|
||||||
size.c
|
size.c
|
||||||
sparc-pinsn.c
|
sparc-pinsn.c
|
||||||
strip.c
|
|
||||||
version.c
|
version.c
|
||||||
|
|
||||||
Do-last:
|
Do-last:
|
||||||
@ -68,6 +69,26 @@ echo Done in `pwd`.
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# $Log$
|
# $Log$
|
||||||
|
# Revision 1.11 1991/11/18 08:04:14 bothner
|
||||||
|
# * Makefile.in: Bump to version 1.92.
|
||||||
|
# * version.c, Makefile.in: Get version string from Makefile.
|
||||||
|
# * copy.c, is-strip.c, not-strip.c, maybe-strip.c, Makefile.in:
|
||||||
|
# Make the same change that we earlier did for ar/ranlib:
|
||||||
|
# Generate two different binaries for strip and copy and use
|
||||||
|
# a global variable with different values to distinguish
|
||||||
|
# ostrip from copy. (-1 means to use argv[0] to decide,
|
||||||
|
# so you can get the old behavior, but it is no longer the default).
|
||||||
|
# * copy.c (copy_file): Set EXEC_P of output bfd if input is so.
|
||||||
|
# * copy.c (main): If is_strip==-1, compare last 5 chars
|
||||||
|
# of argv[0], not the whole path.
|
||||||
|
# * copy.c (main): Return 0, not 1.
|
||||||
|
# * copy.c (setup_sections): Fix due to change in bfd_make_section
|
||||||
|
# now failing if asked for a duplicate section.
|
||||||
|
# * strip.c, ostrip.c: Removed obsolete files.
|
||||||
|
# * ar.c, not-ranlib.c, maybe-ranlib.c:
|
||||||
|
# Change encoding of is_ranlib variable to be consistent
|
||||||
|
# with is_strip for strip.copy (i.e -1 to means use argv[0]).
|
||||||
|
#
|
||||||
# Revision 1.10 1991/11/15 23:34:33 pesch
|
# Revision 1.10 1991/11/15 23:34:33 pesch
|
||||||
# .Sanitize: reflect someone's apocopation of binutils.texi[nfo] name
|
# .Sanitize: reflect someone's apocopation of binutils.texi[nfo] name
|
||||||
# Makefile.in: improve texi2roff workarounds
|
# Makefile.in: improve texi2roff workarounds
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
Sun Nov 17 23:40:59 1991 Per Bothner (bothner at cygnus.com)
|
||||||
|
|
||||||
|
* Makefile.in: Bump to version 1.92.
|
||||||
|
* version.c, Makefile.in: Get version string from Makefile.
|
||||||
|
* copy.c, is-strip.c, not-strip.c, maybe-strip.c, Makefile.in:
|
||||||
|
Make the same change that we earlier did for ar/ranlib:
|
||||||
|
Generate two different binaries for strip and copy and use
|
||||||
|
a global variable with different values to distinguish
|
||||||
|
ostrip from copy. (-1 means to use argv[0] to decide,
|
||||||
|
so you can get the old behavior, but it is no longer the default).
|
||||||
|
* copy.c (copy_file): Set EXEC_P of output bfd if input is so.
|
||||||
|
* copy.c (main): If is_strip==-1, compare last 5 chars
|
||||||
|
of argv[0], not the whole path.
|
||||||
|
* copy.c (main): Return 0, not 1.
|
||||||
|
* copy.c (setup_sections): Fix due to change in bfd_make_section
|
||||||
|
now failing if asked for a duplicate section.
|
||||||
|
* strip.c, ostrip.c: Removed obsolete files.
|
||||||
|
* ar.c, not-ranlib.c, maybe-ranlib.c:
|
||||||
|
Change encoding of is_ranlib variable to be consistent
|
||||||
|
with is_strip for strip.copy (i.e -1 to means use argv[0]).
|
||||||
|
|
||||||
|
Thu Nov 14 20:11:02 1991 Per Bothner (bothner at cygnus.com)
|
||||||
|
|
||||||
|
* version.c (program_version): Update to version 1.92.
|
||||||
|
|
||||||
|
Tue Nov 12 16:17:53 1991 Per Bothner (bothner at cygnus.com)
|
||||||
|
|
||||||
|
* ar.c (get_pos_bfd): Previous fix was missing a "break".
|
||||||
|
|
||||||
Thu Nov 7 08:55:56 1991 Steve Chamberlain (sac at cygnus.com)
|
Thu Nov 7 08:55:56 1991 Steve Chamberlain (sac at cygnus.com)
|
||||||
|
|
||||||
* am29k-pinsn.c: Fixed bug in mtacc, dmac and fmac instruction
|
* am29k-pinsn.c: Fixed bug in mtacc, dmac and fmac instruction
|
||||||
|
@ -32,6 +32,11 @@ static void copy_sections();
|
|||||||
static boolean strip;
|
static boolean strip;
|
||||||
static boolean verbose;
|
static boolean verbose;
|
||||||
|
|
||||||
|
/* This flag distinguishes between strip and copy:
|
||||||
|
1 means this is 'strip'; 0 means this is 'copy'.
|
||||||
|
-1 means if we should use argv[0] to decide. */
|
||||||
|
extern int is_strip;
|
||||||
|
|
||||||
/* IMPORTS */
|
/* IMPORTS */
|
||||||
extern char *program_name;
|
extern char *program_name;
|
||||||
extern char *xmalloc();
|
extern char *xmalloc();
|
||||||
@ -134,7 +139,7 @@ bfd *obfd;
|
|||||||
sympp = (asymbol **) xmalloc(get_symtab_upper_bound(ibfd));
|
sympp = (asymbol **) xmalloc(get_symtab_upper_bound(ibfd));
|
||||||
symcount = bfd_canonicalize_symtab(ibfd, sympp);
|
symcount = bfd_canonicalize_symtab(ibfd, sympp);
|
||||||
|
|
||||||
bfd_set_symtab(obfd, sympp, strip == true ? 0 : symcount);
|
bfd_set_symtab(obfd, sympp, is_strip ? 0 : symcount);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bfd mandates that all output sections be created and sizes set before
|
bfd mandates that all output sections be created and sizes set before
|
||||||
@ -242,6 +247,8 @@ copy_file(input_filename, output_filename)
|
|||||||
|
|
||||||
copy_object(ibfd, obfd);
|
copy_object(ibfd, obfd);
|
||||||
|
|
||||||
|
if (ibfd->flags & EXEC_P)
|
||||||
|
obfd->flags |= EXEC_P;
|
||||||
if (!bfd_close(obfd))
|
if (!bfd_close(obfd))
|
||||||
bfd_fatal(output_filename);
|
bfd_fatal(output_filename);
|
||||||
|
|
||||||
@ -267,11 +274,15 @@ setup_sections(ibfd, isection, obfd)
|
|||||||
{
|
{
|
||||||
sec_ptr osection;
|
sec_ptr osection;
|
||||||
char *err;
|
char *err;
|
||||||
|
|
||||||
|
osection = bfd_get_section_by_name(obfd, bfd_section_name(ibfd, isection));
|
||||||
|
if (osection == NULL) {
|
||||||
osection = bfd_make_section(obfd, bfd_section_name(ibfd, isection));
|
osection = bfd_make_section(obfd, bfd_section_name(ibfd, isection));
|
||||||
if (osection == NULL) {
|
if (osection == NULL) {
|
||||||
err = "making";
|
err = "making";
|
||||||
goto loser;
|
goto loser;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!bfd_set_section_size(obfd,
|
if (!bfd_set_section_size(obfd,
|
||||||
osection,
|
osection,
|
||||||
@ -338,7 +349,7 @@ copy_sections(ibfd, isection, obfd)
|
|||||||
if (size == 0)
|
if (size == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (strip == true || get_reloc_upper_bound(ibfd, isection) == 0)
|
if (is_strip || get_reloc_upper_bound(ibfd, isection) == 0)
|
||||||
{
|
{
|
||||||
bfd_set_reloc(obfd, osection, (arelent **)NULL, 0);
|
bfd_set_reloc(obfd, osection, (arelent **)NULL, 0);
|
||||||
}
|
}
|
||||||
@ -375,8 +386,9 @@ main(argc, argv)
|
|||||||
|
|
||||||
bfd_init();
|
bfd_init();
|
||||||
|
|
||||||
if (strcmp(program_name,"strip") == 0) {
|
if (is_strip < 0) {
|
||||||
strip = true;
|
i = strlen (program_name);
|
||||||
|
is_strip = (i >= 5 && strcmp(program_name+i-5,"strip"));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++)
|
||||||
@ -391,7 +403,7 @@ main(argc, argv)
|
|||||||
input_target = output_target = argv[i];
|
input_target = output_target = argv[i];
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
strip = true;
|
is_strip = 1;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
i++;
|
i++;
|
||||||
@ -433,5 +445,5 @@ main(argc, argv)
|
|||||||
else {
|
else {
|
||||||
copy_file(input_filename, output_filename);
|
copy_file(input_filename, output_filename);
|
||||||
}
|
}
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user