diff options
author | Luis R. Rodriguez <mcgrof@kernel.org> | 2015-10-23 18:45:41 -0700 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@kernel.org> | 2016-02-11 08:42:16 -0800 |
commit | 01d9ed4478b880a3e638183d16dd9ae6fbc7b3b7 (patch) | |
tree | 5b899141b3864a21bab5c8fcf0912ceacee65529 | |
parent | f6eb626b2835a25b77139278e8955e29b1bdad5a (diff) | |
download | linker-tables-01d9ed4478b880a3e638183d16dd9ae6fbc7b3b7.tar.gz |
custom.lds: move .tbl back out to its own section
Now that we've demoed the binary let's stick to something
that would look more like we would use upstream on Linux.
We'd want its own section, perhaps right after .iommu_table
or eventually extending / enhancing it by making it more
generic.
For now we keep SORT_BY_INIT_PRIORITY() but annotate that
we may just want SORT() for now. While at it, add an ALIGN(8).
Now the fun begins -- extending our init struct to match
more of our needs. This will be to match requirements of the
kernels' iommu_table hacks (dependencies), but we're also
shooting to make it very generic.
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
-rw-r--r-- | custom.lds | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -59,7 +59,6 @@ SECTIONS *(.text.startup .text.startup.*) *(.text.hot .text.hot.*) *(.text .stub .text.* .gnu.linkonce.t.*) - *(SORT_BY_INIT_PRIORITY(.tbl.*)) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) } @@ -153,6 +152,17 @@ SECTIONS _edata = .; PROVIDE (edata = .); . = .; + /* + * XXX: Linux already uses SORT() on vmlinux.lds, + * but SORT_BY_INIT_PRIORITY() seems more well suited + * for being able to annotate priorities, as SORT() seems + * to sort lexicographically. SORT_BY_INIT_PRIORITY() may + * only be available on newer binutils though, we should + * look into the pros/cons of both. + */ + .tbl : { *(SORT_BY_INIT_PRIORITY(.tbl.*)) } + . = ALIGN(8); + __bss_start = .; .bss : { |