+Tue Apr 21 16:07:18 1998 Stanislav Brabec <utx@k332.feld.cvut.cz>
+
+ * objcopy.c (preserve_dates): New file static variable.
+ (smart_rename): If preserve_dates, call set_times when copying.
+ (strip_main): Remove preserve_dates local variable.
+ (copy_main): Likewise.
+
Tue Apr 7 15:41:15 1998 Ian Lance Taylor <ian@cygnus.com>
* Makefile.am (DISTSTUFF): Add defparse.h, defparse.c, rclex.c,
Tue Feb 17 20:34:11 1998 Ian Lance Taylor <ian@cygnus.com>
+ * dlltool.c (gen_exp_file): Generate _imp__%s as well as __imp_%s,
+ for Microsoft compatibility.
+ (make_one_lib_file): Likewise.
+
* dlltool.c (make_one_lib_file): Don't add 1 to hint.
Fri Feb 13 16:37:44 1998 Ian Lance Taylor <ian@cygnus.com>
static void setup_section PARAMS ((bfd *, asection *, PTR));
static void copy_section PARAMS ((bfd *, asection *, PTR));
static void get_sections PARAMS ((bfd *, asection *, PTR));
-static int compare_section_vma PARAMS ((const PTR, const PTR));
+static int compare_section_lma PARAMS ((const PTR, const PTR));
static void add_specific_symbol PARAMS ((const char *, struct symlist **));
static boolean is_specified_symbol PARAMS ((const char *, struct symlist *));
static boolean is_strip_section PARAMS ((bfd *, asection *));
static int interleave = 4;
static boolean verbose; /* Print file and target names. */
+static boolean preserve_dates; /* Preserve input file timestamp. */
static int status = 0; /* Exit status. */
enum strip_action
set = osections;
bfd_map_over_sections (obfd, get_sections, (void *) &set);
- qsort (osections, c, sizeof (asection *), compare_section_vma);
+ qsort (osections, c, sizeof (asection *), compare_section_lma);
gaps = (bfd_size_type *) xmalloc (c * sizeof (bfd_size_type));
memset (gaps, 0, c * sizeof (bfd_size_type));
continue;
size = bfd_section_size (obfd, osections[i]);
- gap_start = bfd_section_vma (obfd, osections[i]) + size;
- gap_stop = bfd_section_vma (obfd, osections[i + 1]);
+ gap_start = bfd_section_lma (obfd, osections[i]) + size;
+ gap_stop = bfd_section_lma (obfd, osections[i + 1]);
if (gap_start < gap_stop)
{
if (! bfd_set_section_size (obfd, osections[i],
if (pad_to_set)
{
- bfd_vma vma;
+ bfd_vma lma;
bfd_size_type size;
- vma = bfd_section_vma (obfd, osections[c - 1]);
+ lma = bfd_section_lma (obfd, osections[c - 1]);
size = bfd_section_size (obfd, osections[c - 1]);
- if (vma + size < pad_to)
+ if (lma + size < pad_to)
{
if (! bfd_set_section_size (obfd, osections[c - 1],
- pad_to - vma))
+ pad_to - lma))
{
fprintf (stderr, "%s: Can't add padding to %s: %s\n",
program_name,
}
else
{
- gaps[c - 1] = pad_to - (vma + size);
- if (max_gap < pad_to - (vma + size))
- max_gap = pad_to - (vma + size);
+ gaps[c - 1] = pad_to - (lma + size);
+ if (max_gap < pad_to - (lma + size))
+ max_gap = pad_to - (lma + size);
}
}
- }
+ }
}
/* Symbol filtering must happen after the output sections have
sections to the front, where they are easier to ignore. */
static int
-compare_section_vma (arg1, arg2)
+compare_section_lma (arg1, arg2)
const PTR arg1;
const PTR arg2;
{
return 1;
}
- /* Sort sections by VMA. */
- if ((*sec1)->vma > (*sec2)->vma)
+ /* Sort sections by LMA. */
+ if ((*sec1)->lma > (*sec2)->lma)
return 1;
- else if ((*sec1)->vma < (*sec2)->vma)
+ else if ((*sec1)->lma < (*sec2)->lma)
return -1;
- /* Sort sections with the same VMA by size. */
+ /* Sort sections with the same LMA by size. */
if ((*sec1)->_raw_size > (*sec2)->_raw_size)
return 1;
else if ((*sec1)->_raw_size < (*sec2)->_raw_size)
errno = saved;
perror ("simple_copy");
}
+ if (preserve_dates)
+ set_times (to, &s);
unlink (from);
}
#endif /* _WIN32 && !__CYGWIN32__ */
{
char *input_target = NULL, *output_target = NULL;
boolean show_version = false;
- boolean preserve_dates = false;
int c, i;
struct section_list *p;
char *output_file = NULL;
char *input_target = NULL, *output_target = NULL;
boolean show_version = false;
boolean adjust_warn = true;
- boolean preserve_dates = false;
int c;
struct section_list *p;
struct stat statbuf;