Skip to content

Commit 57f6295

Browse files
committed
---
yaml --- r: 1356 b: refs/heads/master c: eb854ff h: refs/heads/master v: v3
1 parent 152e9d4 commit 57f6295

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 60635999f313981abe157318025a19d60d8d310a
2+
refs/heads/master: eb854ffb4423c053451882fdc204fd717bb07ad4

trunk/src/boot/be/elf.ml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,27 @@ let emit_file
16441644
htab_put text_frags None code;
16451645
htab_put rodata_frags None data;
16461646

1647+
if sess.Session.sess_targ = FreeBSD_x86_elf
1648+
then
1649+
(*
1650+
* FreeBSD wants some extra symbols in .bss so its libc can fill
1651+
* them in, I think.
1652+
*)
1653+
List.iter
1654+
(fun x -> htab_put bss_frags (Some x) (WORD (TY_u32, (IMM 0L))))
1655+
[
1656+
"environ";
1657+
"optind";
1658+
"optarg";
1659+
"_CurrentRuneLocale";
1660+
"__stack_chk_guard";
1661+
"__mb_sb_limit";
1662+
"__isthreaded";
1663+
"__stdinp";
1664+
"__stderrp";
1665+
"__stdoutp";
1666+
];
1667+
16471668
Hashtbl.iter
16481669
begin
16491670
fun _ tab ->

0 commit comments

Comments
 (0)