▲ | matheusmoreira 5 days ago | |||||||||||||||||||||||||
> I wouldn't call them "same concept" at all. They are both metadata about file extents and their memory images. > sections are far easier to work with Yes. They are not, however, loaded into memory by default. Linkers do not generate LOAD segments for section metadata since they are not needed for execution. Thus it's impossible for a program to introspect its own sections without additional logic and I/O to read them into memory. > Also, normally you just just call `getauxval`, but if needed the type is already named `ElfW(auxv_t)*`. True. I didn't use it because it was not available. I wrote my article in the context of a freestanding nolibc program. | ||||||||||||||||||||||||||
▲ | o11c 5 days ago | parent [-] | |||||||||||||||||||||||||
Right, but you can just use the section start/end symbols for a section that already goes into a mapped segment. | ||||||||||||||||||||||||||
|