diff options
author | Alan Modra <amodra@gmail.com> | 2020-07-07 09:52:21 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-07-07 18:26:33 +0930 |
commit | c800188601ee6f537d268fcadfbac7be0389ced7 (patch) | |
tree | 912d58871e9996ebcfbf30d10628fccc7077e06e /bfd | |
parent | 8af7926f455328bfc34456f6765c0cb1801e758e (diff) | |
download | gdb-c800188601ee6f537d268fcadfbac7be0389ced7.zip gdb-c800188601ee6f537d268fcadfbac7be0389ced7.tar.gz gdb-c800188601ee6f537d268fcadfbac7be0389ced7.tar.bz2 |
XCOFF deterministic archives
Adds support for "ar -D".
* coff-rs6000.c (xcoff_write_archive_contents_old): Set default
time, uid, gid and mode for deterministic archive.
(xcoff_write_archive_contents_big): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/coff-rs6000.c | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 057bc05..580edfe 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2020-07-07 Alan Modra <amodra@gmail.com> + * coff-rs6000.c (xcoff_write_archive_contents_old): Set default + time, uid, gid and mode for deterministic archive. + (xcoff_write_archive_contents_big): Likewise. + +2020-07-07 Alan Modra <amodra@gmail.com> + * coffcode.h (coff_classify_symbol): Handle C_HIDEXT and C_AIX_WEAKEXT. diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index 51fab9f..00c9d7c 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -2101,6 +2101,13 @@ xcoff_write_archive_contents_old (bfd *abfd) bfd_set_error (bfd_error_system_call); return FALSE; } + if ((abfd->flags & BFD_DETERMINISTIC_OUTPUT) != 0) + { + s.st_mtime = 0; + s.st_uid = 0; + s.st_gid = 0; + s.st_mode = 0644; + } ahdrp = bfd_zalloc (sub, sizeof (*ahdrp)); if (ahdrp == NULL) @@ -2321,6 +2328,13 @@ xcoff_write_archive_contents_big (bfd *abfd) bfd_set_error (bfd_error_system_call); return FALSE; } + if ((abfd->flags & BFD_DETERMINISTIC_OUTPUT) != 0) + { + s.st_mtime = 0; + s.st_uid = 0; + s.st_gid = 0; + s.st_mode = 0644; + } ahdrp = bfd_zalloc (current_bfd, sizeof (*ahdrp)); if (ahdrp == NULL) |