+ /* Return the section for this partial symbol, or nullptr if no
+ section has been set. */
+ struct obj_section *obj_section (struct objfile *objfile) const
+ {
+ if (ginfo.section >= 0)
+ return &objfile->sections[ginfo.section];
+ return nullptr;
+ }
+
+ /* Return the unrelocated address of this partial symbol. */
+ CORE_ADDR unrelocated_address () const
+ {
+ return ginfo.value.address;
+ }
+
+ /* Return the address of this partial symbol, relocated according to
+ the offsets provided in OBJFILE. */
+ CORE_ADDR address (const struct objfile *objfile) const
+ {
+ return (ginfo.value.address
+ + ANOFFSET (objfile->section_offsets, ginfo.section));
+ }
+
+ /* Set the address of this partial symbol. The address must be
+ unrelocated. */
+ void set_unrelocated_address (CORE_ADDR addr)
+ {
+ ginfo.value.address = addr;
+ }
+
+ /* Note that partial_symbol does not derive from general_symbol_info
+ due to the bcache. See add_psymbol_to_bcache. */