Yang Zhang commented on a discussion: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1505#note_160075


Thanks, you are right. I misunderstood the difference between the signed value 
represented by a PREL31 relocation and the 31-bit field written back to the 
place.

For a backward offset, bit 30 represents the sign in the PREL31 field, while 
bit 31 must be preserved. Returning the sign-extended value would therefore 
corrupt bit 31, especially for .ARM.exidx entries.

To confirm, I plan to rework this MR by renaming the helper, removing the dead 
branch, and preserving bit 31 of the original place. I will leave the optional 
overflow check for a separate change. Does that sound right?

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1505#note_160075
You're receiving this email because of your account on gitlab.rtems.org. 
Unsubscribe from this thread: 
https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-170apcd4fr09cqwg66ar646mn-1d/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


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

Reply via email to