assembly - Position independent code related: why discard r/w data in compressed kernel linker script? -


i've been trying undrestand arm linux linker script compressed kernel image: http://elixir.free-electrons.com/source/arch/arm/boot/compressed/vmlinux.lds.s?v=4.4.19

i understand /arch/arm/boot/compressed/head.s written position independent image can loaded @ point in ram , yet working correctly.

but can not understand entry:

22   /discard/ : {                                 23     *(.arm.exidx*) 24     *(.arm.extab*) 25     /* 26      * discard r/w data - produces link error if have any, 27      * required pic decompression.  local data generates 28      * gotoff relocations, prevents being relocated independently 29      * of text/got segments. 30      */ 31     *(.data) 

when looked gnu ld user manual : special secname /discard/' may used discard input sections. sections assigned output section named/discard/' not included in final link output.

my question why need discard .data section. , gotoff relocations , relevance in context?

another thing observed while compiling /arch/arm/boot/compressed/head.s, linux kernel not use of pic related compiler options. why ?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -