[PATCH] D22961: [ELF] - Linkerscript: restrict moving location counter backwards.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 8 08:10:15 PDT 2016
grimar added a comment.
In https://reviews.llvm.org/D22961#508415, @emaste wrote:
> > Problem here that BSD script is not full, there are orphan sections. gold and ld use heuristic to place orphan sections
>
> > somewhere in the middle. LLD does not do that and we produce broken output here:
>
>
> We'll want to address this in FreeBSD's linker script in general so that we don't have the orphan sections. I agree that a warning/error would be desirable here to aid in identifying and correcting these cases. I'm not sure off hand how to handle the __start_<section> symbol generation when including these sections in the linker script though.
Just in case - I had to add next sections explicitly to BSD script.
.set_sysctl_set : { *(.set_sysctl_set) }
.set_sysinit_set : { *(.set_sysinit_set) }
.set_sysuninit_set : { *(.set_sysuninit_set) }
.set_modmetadata_set : { *(.set_modmetadata_set) }
.set_ah_chips : { *(.set_ah_chips) }
.set_ah_rfs : { *(.set_ah_rfs) }
.set_kbddriver_set : { *(.set_kbddriver_set) }
.set_cons_set : { *(.set_cons_set) }
.usb_host_id : { *(.usb_host_id) }
.set_vt_drv_set : { *(.set_vt_drv_set) }
.set_sdt_providers : { *(.set_sdt_providers) }
.set_sdt_probes_set : { *(.set_sdt_probes_set) }
.set_sdt_argtypes_set : { *(.set_sdt_argtypes_set) }
.set_kdb_dbbe_set : { *(.set_kdb_dbbe_set) }
.set_ratectl_set : { *(.set_ratectl_set) }
.set_crypto_set : { *(.set_crypto_set) }
.set_ieee80211_ioctl_getset : { *(.set_ieee80211_ioctl_getset) }
.set_ieee80211_ioctl_setset : { *(.set_ieee80211_ioctl_setset) }
.set_scanner_set : { *(.set_scanner_set) }
.set_videodriver_set : { *(.set_videodriver_set) }
.set_scterm_set : { *(.set_scterm_set) }
.set_scrndr_set : { *(.set_scrndr_set) }
.set_vga_set : { *(.set_vga_set) }
.kern_conf : { *(.kern_conf) }
.set_pcpu : { *(.set_pcpu) }
+ Also there one more unprocessed: .SUNW_ctf but it is not allocatable so I am fine it is added as orphan for me now. Generally for non allocatable sections it is probably ok to be orphans I think.
https://reviews.llvm.org/D22961
More information about the llvm-commits
mailing list