220-gc_sections.patch 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. --- a/arch/mips/Makefile
  2. +++ b/arch/mips/Makefile
  3. @@ -89,10 +89,14 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
  4. #
  5. cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
  6. cflags-y += -msoft-float
  7. -LDFLAGS_vmlinux += -G 0 -static -n -nostdlib
  8. +LDFLAGS_vmlinux += -G 0 -static -n -nostdlib --gc-sections --sort-section=name
  9. KBUILD_AFLAGS_MODULE += -mlong-calls
  10. KBUILD_CFLAGS_MODULE += -mlong-calls
  11. +ifndef CONFIG_FUNCTION_TRACER
  12. +KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections
  13. +endif
  14. +
  15. cflags-y += -ffreestanding
  16. #
  17. --- a/arch/mips/kernel/vmlinux.lds.S
  18. +++ b/arch/mips/kernel/vmlinux.lds.S
  19. @@ -67,7 +67,7 @@ SECTIONS
  20. /* Exception table for data bus errors */
  21. __dbe_table : {
  22. __start___dbe_table = .;
  23. - *(__dbe_table)
  24. + KEEP(*(__dbe_table))
  25. __stop___dbe_table = .;
  26. }
  27. @@ -112,7 +112,7 @@ SECTIONS
  28. . = ALIGN(4);
  29. .mips.machines.init : AT(ADDR(.mips.machines.init) - LOAD_OFFSET) {
  30. __mips_machines_start = .;
  31. - *(.mips.machines.init)
  32. + KEEP(*(.mips.machines.init))
  33. __mips_machines_end = .;
  34. }
  35. --- a/include/asm-generic/vmlinux.lds.h
  36. +++ b/include/asm-generic/vmlinux.lds.h
  37. @@ -101,7 +101,7 @@
  38. #ifdef CONFIG_FTRACE_MCOUNT_RECORD
  39. #define MCOUNT_REC() . = ALIGN(8); \
  40. VMLINUX_SYMBOL(__start_mcount_loc) = .; \
  41. - *(__mcount_loc) \
  42. + KEEP(*(__mcount_loc)) \
  43. VMLINUX_SYMBOL(__stop_mcount_loc) = .;
  44. #else
  45. #define MCOUNT_REC()
  46. @@ -109,7 +109,7 @@
  47. #ifdef CONFIG_TRACE_BRANCH_PROFILING
  48. #define LIKELY_PROFILE() VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \
  49. - *(_ftrace_annotated_branch) \
  50. + KEEP(*(_ftrace_annotated_branch)) \
  51. VMLINUX_SYMBOL(__stop_annotated_branch_profile) = .;
  52. #else
  53. #define LIKELY_PROFILE()
  54. @@ -117,7 +117,7 @@
  55. #ifdef CONFIG_PROFILE_ALL_BRANCHES
  56. #define BRANCH_PROFILE() VMLINUX_SYMBOL(__start_branch_profile) = .; \
  57. - *(_ftrace_branch) \
  58. + KEEP(*(_ftrace_branch)) \
  59. VMLINUX_SYMBOL(__stop_branch_profile) = .;
  60. #else
  61. #define BRANCH_PROFILE()
  62. @@ -126,7 +126,7 @@
  63. #ifdef CONFIG_EVENT_TRACING
  64. #define FTRACE_EVENTS() . = ALIGN(8); \
  65. VMLINUX_SYMBOL(__start_ftrace_events) = .; \
  66. - *(_ftrace_events) \
  67. + KEEP(*(_ftrace_events)) \
  68. VMLINUX_SYMBOL(__stop_ftrace_events) = .;
  69. #else
  70. #define FTRACE_EVENTS()
  71. @@ -134,7 +134,7 @@
  72. #ifdef CONFIG_TRACING
  73. #define TRACE_PRINTKS() VMLINUX_SYMBOL(__start___trace_bprintk_fmt) = .; \
  74. - *(__trace_printk_fmt) /* Trace_printk fmt' pointer */ \
  75. + KEEP(*(__trace_printk_fmt)) /* Trace_printk fmt' pointer */ \
  76. VMLINUX_SYMBOL(__stop___trace_bprintk_fmt) = .;
  77. #else
  78. #define TRACE_PRINTKS()
  79. @@ -143,7 +143,7 @@
  80. #ifdef CONFIG_FTRACE_SYSCALLS
  81. #define TRACE_SYSCALLS() . = ALIGN(8); \
  82. VMLINUX_SYMBOL(__start_syscalls_metadata) = .; \
  83. - *(__syscalls_metadata) \
  84. + KEEP(*(__syscalls_metadata)) \
  85. VMLINUX_SYMBOL(__stop_syscalls_metadata) = .;
  86. #else
  87. #define TRACE_SYSCALLS()
  88. @@ -153,7 +153,7 @@
  89. #define KERNEL_DTB() \
  90. STRUCT_ALIGN(); \
  91. VMLINUX_SYMBOL(__dtb_start) = .; \
  92. - *(.dtb.init.rodata) \
  93. + KEEP(*(.dtb.init.rodata)) \
  94. VMLINUX_SYMBOL(__dtb_end) = .;
  95. /* .data section */
  96. @@ -173,15 +173,16 @@
  97. /* implement dynamic printk debug */ \
  98. . = ALIGN(8); \
  99. VMLINUX_SYMBOL(__start___jump_table) = .; \
  100. - *(__jump_table) \
  101. + KEEP(*(__jump_table)) \
  102. VMLINUX_SYMBOL(__stop___jump_table) = .; \
  103. . = ALIGN(8); \
  104. VMLINUX_SYMBOL(__start___verbose) = .; \
  105. - *(__verbose) \
  106. + KEEP(*(__verbose)) \
  107. VMLINUX_SYMBOL(__stop___verbose) = .; \
  108. LIKELY_PROFILE() \
  109. BRANCH_PROFILE() \
  110. - TRACE_PRINTKS()
  111. + TRACE_PRINTKS() \
  112. + *(.data.[a-zA-Z_]*)
  113. /*
  114. * Data section helpers
  115. @@ -235,39 +236,39 @@
  116. /* PCI quirks */ \
  117. .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \
  118. VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \
  119. - *(.pci_fixup_early) \
  120. + KEEP(*(.pci_fixup_early)) \
  121. VMLINUX_SYMBOL(__end_pci_fixups_early) = .; \
  122. VMLINUX_SYMBOL(__start_pci_fixups_header) = .; \
  123. - *(.pci_fixup_header) \
  124. + KEEP(*(.pci_fixup_header)) \
  125. VMLINUX_SYMBOL(__end_pci_fixups_header) = .; \
  126. VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \
  127. - *(.pci_fixup_final) \
  128. + KEEP(*(.pci_fixup_final)) \
  129. VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \
  130. VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \
  131. - *(.pci_fixup_enable) \
  132. + KEEP(*(.pci_fixup_enable)) \
  133. VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \
  134. VMLINUX_SYMBOL(__start_pci_fixups_resume) = .; \
  135. - *(.pci_fixup_resume) \
  136. + KEEP(*(.pci_fixup_resume)) \
  137. VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \
  138. VMLINUX_SYMBOL(__start_pci_fixups_resume_early) = .; \
  139. - *(.pci_fixup_resume_early) \
  140. + KEEP(*(.pci_fixup_resume_early)) \
  141. VMLINUX_SYMBOL(__end_pci_fixups_resume_early) = .; \
  142. VMLINUX_SYMBOL(__start_pci_fixups_suspend) = .; \
  143. - *(.pci_fixup_suspend) \
  144. + KEEP(*(.pci_fixup_suspend)) \
  145. VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .; \
  146. } \
  147. \
  148. /* Built-in firmware blobs */ \
  149. .builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) { \
  150. VMLINUX_SYMBOL(__start_builtin_fw) = .; \
  151. - *(.builtin_fw) \
  152. + KEEP(*(.builtin_fw)) \
  153. VMLINUX_SYMBOL(__end_builtin_fw) = .; \
  154. } \
  155. \
  156. /* RapidIO route ops */ \
  157. .rio_ops : AT(ADDR(.rio_ops) - LOAD_OFFSET) { \
  158. VMLINUX_SYMBOL(__start_rio_switch_ops) = .; \
  159. - *(.rio_switch_ops) \
  160. + KEEP(*(.rio_switch_ops)) \
  161. VMLINUX_SYMBOL(__end_rio_switch_ops) = .; \
  162. } \
  163. \
  164. @@ -276,49 +277,49 @@
  165. /* Kernel symbol table: Normal symbols */ \
  166. __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
  167. VMLINUX_SYMBOL(__start___ksymtab) = .; \
  168. - *(SORT(___ksymtab+*)) \
  169. + KEEP(*(SORT(___ksymtab+*))) \
  170. VMLINUX_SYMBOL(__stop___ksymtab) = .; \
  171. } \
  172. \
  173. /* Kernel symbol table: GPL-only symbols */ \
  174. __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \
  175. VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \
  176. - *(SORT(___ksymtab_gpl+*)) \
  177. + KEEP(*(SORT(___ksymtab_gpl+*))) \
  178. VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \
  179. } \
  180. \
  181. /* Kernel symbol table: Normal unused symbols */ \
  182. __ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \
  183. VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \
  184. - *(SORT(___ksymtab_unused+*)) \
  185. + KEEP(*(SORT(___ksymtab_unused+*))) \
  186. VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \
  187. } \
  188. \
  189. /* Kernel symbol table: GPL-only unused symbols */ \
  190. __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \
  191. VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \
  192. - *(SORT(___ksymtab_unused_gpl+*)) \
  193. + KEEP(*(SORT(___ksymtab_unused_gpl+*))) \
  194. VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \
  195. } \
  196. \
  197. /* Kernel symbol table: GPL-future-only symbols */ \
  198. __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
  199. VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \
  200. - *(SORT(___ksymtab_gpl_future+*)) \
  201. + KEEP(*(SORT(___ksymtab_gpl_future+*))) \
  202. VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \
  203. } \
  204. \
  205. /* Kernel symbol table: Normal symbols */ \
  206. __kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \
  207. VMLINUX_SYMBOL(__start___kcrctab) = .; \
  208. - *(SORT(___kcrctab+*)) \
  209. + KEEP(*(SORT(___kcrctab+*))) \
  210. VMLINUX_SYMBOL(__stop___kcrctab) = .; \
  211. } \
  212. \
  213. /* Kernel symbol table: GPL-only symbols */ \
  214. __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \
  215. VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \
  216. - *(SORT(___kcrctab_gpl+*)) \
  217. + KEEP(*(SORT(___kcrctab_gpl+*))) \
  218. VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \
  219. } \
  220. \
  221. @@ -332,14 +333,14 @@
  222. /* Kernel symbol table: GPL-only unused symbols */ \
  223. __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \
  224. VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \
  225. - *(SORT(___kcrctab_unused_gpl+*)) \
  226. + KEEP(*(SORT(___kcrctab_unused_gpl+*))) \
  227. VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \
  228. } \
  229. \
  230. /* Kernel symbol table: GPL-future-only symbols */ \
  231. __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \
  232. VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \
  233. - *(SORT(___kcrctab_gpl_future+*)) \
  234. + KEEP(*(SORT(___kcrctab_gpl_future+*))) \
  235. VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .; \
  236. } \
  237. \
  238. @@ -362,14 +363,14 @@
  239. /* Built-in module parameters. */ \
  240. __param : AT(ADDR(__param) - LOAD_OFFSET) { \
  241. VMLINUX_SYMBOL(__start___param) = .; \
  242. - *(__param) \
  243. + KEEP(*(__param)) \
  244. VMLINUX_SYMBOL(__stop___param) = .; \
  245. } \
  246. \
  247. /* Built-in module versions. */ \
  248. __modver : AT(ADDR(__modver) - LOAD_OFFSET) { \
  249. VMLINUX_SYMBOL(__start___modver) = .; \
  250. - *(__modver) \
  251. + KEEP(*(__modver)) \
  252. VMLINUX_SYMBOL(__stop___modver) = .; \
  253. . = ALIGN((align)); \
  254. VMLINUX_SYMBOL(__end_rodata) = .; \
  255. @@ -429,7 +430,7 @@
  256. #define ENTRY_TEXT \
  257. ALIGN_FUNCTION(); \
  258. VMLINUX_SYMBOL(__entry_text_start) = .; \
  259. - *(.entry.text) \
  260. + KEEP(*(.entry.text)) \
  261. VMLINUX_SYMBOL(__entry_text_end) = .;
  262. #ifdef CONFIG_FUNCTION_GRAPH_TRACER
  263. @@ -457,7 +458,7 @@
  264. . = ALIGN(align); \
  265. __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { \
  266. VMLINUX_SYMBOL(__start___ex_table) = .; \
  267. - *(__ex_table) \
  268. + KEEP(*(__ex_table)) \
  269. VMLINUX_SYMBOL(__stop___ex_table) = .; \
  270. }
  271. @@ -473,7 +474,7 @@
  272. #ifdef CONFIG_CONSTRUCTORS
  273. #define KERNEL_CTORS() . = ALIGN(8); \
  274. VMLINUX_SYMBOL(__ctors_start) = .; \
  275. - *(.ctors) \
  276. + KEEP(*(.ctors)) \
  277. VMLINUX_SYMBOL(__ctors_end) = .;
  278. #else
  279. #define KERNEL_CTORS()
  280. @@ -526,7 +527,7 @@
  281. #define SBSS(sbss_align) \
  282. . = ALIGN(sbss_align); \
  283. .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \
  284. - *(.sbss) \
  285. + *(.sbss .sbss.*) \
  286. *(.scommon) \
  287. }
  288. @@ -544,7 +545,7 @@
  289. BSS_FIRST_SECTIONS \
  290. *(.bss..page_aligned) \
  291. *(.dynbss) \
  292. - *(.bss) \
  293. + *(.bss .bss.*) \
  294. *(COMMON) \
  295. }
  296. @@ -593,7 +594,7 @@
  297. . = ALIGN(8); \
  298. __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
  299. VMLINUX_SYMBOL(__start___bug_table) = .; \
  300. - *(__bug_table) \
  301. + KEEP(*(__bug_table)) \
  302. VMLINUX_SYMBOL(__stop___bug_table) = .; \
  303. }
  304. #else
  305. @@ -605,7 +606,7 @@
  306. . = ALIGN(4); \
  307. .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
  308. VMLINUX_SYMBOL(__tracedata_start) = .; \
  309. - *(.tracedata) \
  310. + KEEP(*(.tracedata)) \
  311. VMLINUX_SYMBOL(__tracedata_end) = .; \
  312. }
  313. #else
  314. @@ -622,17 +623,17 @@
  315. #define INIT_SETUP(initsetup_align) \
  316. . = ALIGN(initsetup_align); \
  317. VMLINUX_SYMBOL(__setup_start) = .; \
  318. - *(.init.setup) \
  319. + KEEP(*(.init.setup)) \
  320. VMLINUX_SYMBOL(__setup_end) = .;
  321. #define INIT_CALLS_LEVEL(level) \
  322. VMLINUX_SYMBOL(__initcall##level##_start) = .; \
  323. - *(.initcall##level##.init) \
  324. - *(.initcall##level##s.init) \
  325. + KEEP(*(.initcall##level##.init)) \
  326. + KEEP(*(.initcall##level##s.init)) \
  327. #define INIT_CALLS \
  328. VMLINUX_SYMBOL(__initcall_start) = .; \
  329. - *(.initcallearly.init) \
  330. + KEEP(*(.initcallearly.init)) \
  331. INIT_CALLS_LEVEL(0) \
  332. INIT_CALLS_LEVEL(1) \
  333. INIT_CALLS_LEVEL(2) \
  334. @@ -646,21 +647,21 @@
  335. #define CON_INITCALL \
  336. VMLINUX_SYMBOL(__con_initcall_start) = .; \
  337. - *(.con_initcall.init) \
  338. + KEEP(*(.con_initcall.init)) \
  339. VMLINUX_SYMBOL(__con_initcall_end) = .;
  340. #define SECURITY_INITCALL \
  341. VMLINUX_SYMBOL(__security_initcall_start) = .; \
  342. - *(.security_initcall.init) \
  343. + KEEP(*(.security_initcall.init)) \
  344. VMLINUX_SYMBOL(__security_initcall_end) = .;
  345. #ifdef CONFIG_BLK_DEV_INITRD
  346. #define INIT_RAM_FS \
  347. . = ALIGN(4); \
  348. VMLINUX_SYMBOL(__initramfs_start) = .; \
  349. - *(.init.ramfs) \
  350. + KEEP(*(.init.ramfs)) \
  351. . = ALIGN(8); \
  352. - *(.init.ramfs.info)
  353. + KEEP(*(.init.ramfs.info))
  354. #else
  355. #define INIT_RAM_FS
  356. #endif
  357. --- a/arch/arm/Makefile
  358. +++ b/arch/arm/Makefile
  359. @@ -17,11 +17,16 @@ LDFLAGS_vmlinux :=-p --no-undefined -X
  360. ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
  361. LDFLAGS_vmlinux += --be8
  362. endif
  363. +LDFLAGS_vmlinux += --gc-sections --sort-section=name
  364. OBJCOPYFLAGS :=-O binary -R .comment -S
  365. GZFLAGS :=-9
  366. #KBUILD_CFLAGS +=-pipe
  367. +ifndef CONFIG_FUNCTION_TRACER
  368. +KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections
  369. +endif
  370. +
  371. # Never generate .eh_frame
  372. KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
  373. --- a/arch/arm/kernel/vmlinux.lds.S
  374. +++ b/arch/arm/kernel/vmlinux.lds.S
  375. @@ -12,13 +12,13 @@
  376. #define PROC_INFO \
  377. . = ALIGN(4); \
  378. VMLINUX_SYMBOL(__proc_info_begin) = .; \
  379. - *(.proc.info.init) \
  380. + KEEP(*(.proc.info.init)) \
  381. VMLINUX_SYMBOL(__proc_info_end) = .;
  382. #define IDMAP_TEXT \
  383. ALIGN_FUNCTION(); \
  384. VMLINUX_SYMBOL(__idmap_text_start) = .; \
  385. - *(.idmap.text) \
  386. + KEEP(*(.idmap.text)) \
  387. VMLINUX_SYMBOL(__idmap_text_end) = .;
  388. #ifdef CONFIG_HOTPLUG_CPU
  389. @@ -93,7 +93,7 @@ SECTIONS
  390. .text : { /* Real text segment */
  391. _stext = .; /* Text and read-only data */
  392. __exception_text_start = .;
  393. - *(.exception.text)
  394. + KEEP(*(.exception.text))
  395. __exception_text_end = .;
  396. IRQENTRY_TEXT
  397. TEXT_TEXT
  398. @@ -118,7 +118,7 @@ SECTIONS
  399. __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
  400. __start___ex_table = .;
  401. #ifdef CONFIG_MMU
  402. - *(__ex_table)
  403. + KEEP(*(__ex_table))
  404. #endif
  405. __stop___ex_table = .;
  406. }
  407. @@ -130,12 +130,12 @@ SECTIONS
  408. . = ALIGN(8);
  409. .ARM.unwind_idx : {
  410. __start_unwind_idx = .;
  411. - *(.ARM.exidx*)
  412. + KEEP(*(.ARM.exidx*))
  413. __stop_unwind_idx = .;
  414. }
  415. .ARM.unwind_tab : {
  416. __start_unwind_tab = .;
  417. - *(.ARM.extab*)
  418. + KEEP(*(.ARM.extab*))
  419. __stop_unwind_tab = .;
  420. }
  421. #endif
  422. @@ -158,24 +158,24 @@ SECTIONS
  423. }
  424. .init.arch.info : {
  425. __arch_info_begin = .;
  426. - *(.arch.info.init)
  427. + KEEP(*(.arch.info.init))
  428. __arch_info_end = .;
  429. }
  430. .init.tagtable : {
  431. __tagtable_begin = .;
  432. - *(.taglist.init)
  433. + KEEP(*(.taglist.init))
  434. __tagtable_end = .;
  435. }
  436. #ifdef CONFIG_SMP_ON_UP
  437. .init.smpalt : {
  438. __smpalt_begin = .;
  439. - *(.alt.smp.init)
  440. + KEEP(*(.alt.smp.init))
  441. __smpalt_end = .;
  442. }
  443. #endif
  444. .init.pv_table : {
  445. __pv_table_begin = .;
  446. - *(.pv_table)
  447. + KEEP(*(.pv_table))
  448. __pv_table_end = .;
  449. }
  450. .init.data : {
  451. --- a/arch/arm/boot/compressed/Makefile
  452. +++ b/arch/arm/boot/compressed/Makefile
  453. @@ -119,6 +119,7 @@ ifeq ($(CONFIG_FUNCTION_TRACER),y)
  454. ORIG_CFLAGS := $(KBUILD_CFLAGS)
  455. KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
  456. endif
  457. +KBUILD_CFLAGS_KERNEL := $(patsubst -f%-sections,,$(KBUILD_CFLAGS_KERNEL))
  458. ccflags-y := -fpic -fno-builtin -I$(obj)
  459. asflags-y := -Wa,-march=all -DZIMAGE