[NSWI004] _kernel_end

Petr Tuma petr.tuma at d3s.mff.cuni.cz
Thu Oct 22 18:03:34 CEST 2020


Hi,

the suggestion by Vojtech Kane should work (that is, take the address of _kernel_end rather than using it as a pointer). Also, what is your GCC version ? (Last year, we've updated the _kernel_end declaration to help students who tried to use it just as you did, and back then it worked fine in most cases.)

Petr


On 22/10/2020 14:52, Georgii Ekserdzhian wrote:
> Good afternoon,
> 
> When I try to write into the first byte which _kernel_end points to, I get these error message:
> "error: writing 1 byte into a region of size 0"
> "at offset 0 to object '_kernel_end' with size 0 declared here"
> 
> I suppose because _kernel_end is declared with size 0. But I'm not sure how to proceed. My code is just:
> 
> uint8_t *p = _kernel_end;
> *p = 1;
> 
> Georgii Ekserdzhian
> 
> _______________________________________________
> NSWI004 mailing list
> NSWI004 at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/nswi004
> 


More information about the NSWI004 mailing list