The use of *.o in linker script, + bss

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

The use of *.o in linker script, + bss

Postby notzed » Thu Aug 22, 2013 1:04 am

Morning,

I setup a combined makefile using different extensions and implicit rules for epiphany code vs host. My current approach is using different extensions such as '.ec' and '.eo', and so on.

Puzzled as to why the section directives were being ignored, i noticed that the linker script hardcodes a pattern '*.o' for the parallella-specific sections. Unless there's a specific reason it does this perhaps it would make sense to use * like the rest of the rules instead. I also noticed there is no shared bss section which is a bit handy to have.

I don't think it's fully general but this is what i came up with:

.code_dram : {*(code_dram) *(.code_dram) } > EXTERNAL_DRAM_0
.shared_dram : {*(shared_dram) *(.shared_dram) } > EXTERNAL_DRAM_1
.bss.shared : {*(.bss.shared) } > EXTERNAL_DRAM_1

(I think i used external_dram_1 for the last because of some linker conflicts with libc, which i found puzzling as i thought that was what the linker was supposed to resolve. i could be mis-remembering however).

Shouldn't it also be .text.shared and .data.shared as well to fit with the existing naming conventions?
notzed
 
Posts: 331
Joined: Mon Dec 17, 2012 12:28 am
Location: Australia

Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 70 guests