Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22006

Linux OF_DECLARE: How of_device_id struct in section '__$table_of_table' referencing works?

$
0
0

Going though clk source code, I found that most clocks use CLK_OF_DECLARE macro, which, when expanded, creates of_device_id structure in section __clk_of_table

There is __clk_of_table structure declaration:

extern struct of_device_id __clk_of_table;

This thread suggest, that __clk_of_table reflects the special section

Then it got referenced like:

    matches = &__clk_of_table;

How compiler knows that it should reference to section, and not to undeclared structure?


Viewing all articles
Browse latest Browse all 22006

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>