Explicitly include .codepatch and .codepatchend in .rodata such that
authorkettenis <kettenis@openbsd.org>
Tue, 28 Apr 2015 22:29:24 +0000 (22:29 +0000)
committerkettenis <kettenis@openbsd.org>
Tue, 28 Apr 2015 22:29:24 +0000 (22:29 +0000)
the binutils 2.17 linker doesn't make them disappear.

ok deraadt@, guenther@

sys/arch/amd64/conf/ld.script

index 15178e3..fbe23c7 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ld.script,v 1.2 2014/12/21 16:27:07 mlarkin Exp $     */
+/*     $OpenBSD: ld.script,v 1.3 2015/04/28 22:29:24 kettenis Exp $    */
 
 /*
  * Copyright (c) 2009 Tobias Weingartner <weingart@tepid.org>
@@ -69,6 +69,8 @@ SECTIONS
                __rodata_size = SIZEOF(.rodata);
                __rodata_load = LOADADDR(.rodata);
                *(.rodata .rodata.*)
+               *(.codepatch)
+               *(.codepatchend)
        } :rodata
        PROVIDE (erodata = .);
        _erodata = .;
@@ -122,4 +124,3 @@ SECTIONS
                *(.eh_frame)
        }
 }
-