mazen Adel commented on a discussion on cpukit/libdl/rtl.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/679#note_129368

 > +void*
 > +rtems_rtl_obj_base_address (const rtems_rtl_obj* obj)
 > +{
 > +  void* base = NULL;
 > +  
 > +  if (obj->text_base)
 > +    base = obj->text_base;
 > +    
 > +  if (obj->data_base && (!base || obj->data_base < base))
 > +    base = obj->data_base;
 > +    
 > +  if (obj->bss_base && (!base || obj->bss_base < base))
 > +    base = obj->bss_base;
 > +    
 > +  if (obj->const_base && (!base || obj->const_base < base))
 > +    base = obj->const_base;

In 
[standard](https://pubs.opengroup.org/onlinepubs/9799919799/functions/dladdr.html)
 it says

 `The value of the _dli_fbase_ member shall be set to the base of the address 
range occupied by the mapped object`

so here I'm starting with the text_base then proceeding to find the lowest base 
address occupied by the object to get the base of the address range. They don't 
overlap but we need to find the base, please correct me if i'm wrong.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/679#note_129368
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to