aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2023-10-02 13:24:05 +0100
committerNick Clifton <nickc@redhat.com>2023-10-02 13:24:05 +0100
commit6a6117ab0ffe18ea984abca84869eae799c1b346 (patch)
tree7fa0dccd522115cf968d875b61671cd130d8f666 /ld
parent8f6f3f29653d8396146bd93a5c63925a13dd047a (diff)
downloadgdb-6a6117ab0ffe18ea984abca84869eae799c1b346.zip
gdb-6a6117ab0ffe18ea984abca84869eae799c1b346.tar.gz
gdb-6a6117ab0ffe18ea984abca84869eae799c1b346.tar.bz2
Use bfd_get_current_time in places where it is suitable
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/pe-dll.c10
2 files changed, 6 insertions, 9 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3e41bdc..4e4f532 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2023-10-02 Nick Clifton <nickc@redhat.com>
+
+ * pe-dll.c (fill_edata): Use bfd_get_current_time when filling in
+ the timestamp.
+
2023-09-27 Hsinyuan Xavier <TheLastLin@hotmail.com>
PR 30875
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index df08a57..fc83f52 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -1232,15 +1232,7 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
if (pe_data (abfd)->timestamp == -1)
{
- time_t now;
- char *source_date_epoch;
-
- source_date_epoch = getenv ("SOURCE_DATE_EPOCH");
- if (source_date_epoch)
- now = (time_t) strtoll (source_date_epoch, NULL, 10);
- else
- now = time (NULL);
-
+ time_t now = bfd_get_current_time (0);
H_PUT_32 (abfd, now, edata_d + 4);
}
else