UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
516 Views
Registered: ‎08-06-2018

How to link functions to a certain section

Jump to solution

Hi everyone,

 

I know that to link a function to a specific section can be done by using __attribute__ ((section ("section_name"))). But this seems to effect only one function.

What if I want to link all the functions in one .c file and several .c files to a section?

Is there any way to link multiple functions to one section with one declaration?  Or all I can do is just mark all the functions with attribute?

 

Best Regards,

rj

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
483 Views
Registered: ‎02-01-2008

Re: How to link functions to a certain section

Jump to solution

I've done it before but couldn't find my notes on how.

 

I did find this link that shows how to assign the object file to a section. Look at line 108

 

https://github.com/chipKIT32/PIC32-avrdude-bootloader/blob/master/bootloaders/MX1-2-USB-boot-linkerscript.ld

0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
484 Views
Registered: ‎02-01-2008

Re: How to link functions to a certain section

Jump to solution

I've done it before but couldn't find my notes on how.

 

I did find this link that shows how to assign the object file to a section. Look at line 108

 

https://github.com/chipKIT32/PIC32-avrdude-bootloader/blob/master/bootloaders/MX1-2-USB-boot-linkerscript.ld

0 Kudos
Adventurer
Adventurer
460 Views
Registered: ‎08-06-2018

Re: How to link functions to a certain section

Jump to solution
Thank you John,That's exactly what I want!
0 Kudos