KyL
KyL

Reputation: 1077

Can I declare myself section in assembly source code and ld script?

I know

.text : { *(.text) }
.data : { *(.data) }

My questions are:

Appreciate any suggesions.

Upvotes: 0

Views: 253

Answers (1)

incompetent
incompetent

Reputation: 1822

I am summarizing the comments from @Jester @Ross Ridge on question for reference

Yes you can add customize section (with out changing the kernel dynamic loader as it will determine the sections from the ELF headers) you should use .section directive to avoid the error "reset.S: Assembler messages: reset.S:8: Error: unknown pseudo-op: `.mysection".

Upvotes: 0

Related Questions