projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6647169
)
now_seg after closing output file
author
Alan Modra
<amodra@gmail.com>
Wed, 11 Jan 2023 05:01:06 +0000
(15:31 +1030)
committer
Alan Modra
<amodra@gmail.com>
Wed, 11 Jan 2023 05:01:06 +0000
(15:31 +1030)
now_seg, a pointer into the output file sections, isn't valid after
the output file is closed. gas doesn't and shouldn't use now_seg
after this point of course, but let's be safe.
* output-file.c (output_file_close): Clear now_seg and now_subseg.
gas/output-file.c
patch
|
blob
|
history
diff --git
a/gas/output-file.c
b/gas/output-file.c
index 127dc735703eb6ba628f2f478deb17ec1186d32a..0c3a8115bb14ff14a70c68b8c540b7624d4bb384 100644
(file)
--- a/
gas/output-file.c
+++ b/
gas/output-file.c
@@
-99,6
+99,8
@@
output_file_close (void)
res = bfd_cache_close_all ();
else
res = bfd_close (obfd);
+ now_seg = NULL;
+ now_subseg = 0;
filename = out_file_name;
out_file_name = NULL;