64-bit signed/unsigned warnings.
section_size_type psize = File_read::pages(size + (start - poff));
- if (poff + psize >= this->size_)
+ if (poff + static_cast<off_t>(psize) >= this->size_)
{
psize = this->size_ - poff;
gold_assert(psize >= size);
// value. If it is a section symbol, we can not, as in
// that case we have to consider the addend to determine
// the value to use in a relocation.
- section_offset_type start =
- os->starting_output_address(this, shndx);
if (!lv.is_section_symbol())
- lv.set_output_value(lv.input_value() + start);
+ lv.set_output_value(os->output_address(this, shndx,
+ lv.input_value()));
else
{
+ section_offset_type start =
+ os->starting_output_address(this, shndx);
Merged_symbol_value<size>* msv =
new Merged_symbol_value<size>(lv.input_value(), start);
lv.set_merged_symbol_value(msv);
off_t offset) const
{
gold_assert(object->is_section_specially_mapped(shndx));
- // This can only be called meaningfully when layout is complete.
- gold_assert(Output_data::is_layout_complete());
uint64_t addr = this->address() + this->first_input_offset_;
for (Input_section_list::const_iterator p = this->input_sections_.begin();
unsigned char*
get_output_view(off_t start, size_t size)
{
- gold_assert(start >= 0 && start + size <= this->file_size_);
+ gold_assert(start >= 0
+ && start + static_cast<off_t>(size) <= this->file_size_);
return this->base_ + start;
}
gold_assert(output_offset == -1
|| (output_offset >= 0
- && output_offset + view_size <= output_section_size));
+ && (output_offset + static_cast<off_t>(view_size)
+ <= output_section_size)));
unsigned char* view;
if (os->requires_postprocessing())