Ian Lance Taylor
39d0cb0e83
* fileread.cc (File_read::find_view): Add byteshift and vshifted
...
parameters. Update for new key type to views_. Change all
callers.
(File_read::read): Adjust for byteshift in returned view.
(File_read::add_view): New function, broken out of
find_and_make_view.
(File_read::make_view): New function, broken out of
find_and_make_view.
(File_read::find_or_make_view): Add offset and aligned
parameters. Rewrite accordingly. Change all callers.
(File_read::get_view): Add offset and aligned parameters. Adjust
for byteshift in return value.
(File_read::get_lasting_view): Likewise.
* fileread.h (class File_read): Update declarations.
(class File_read::View): Add byteshift_ field. Add byteshift to
constructor. Add byteshift method.
* archive.h (Archive::clear_uncached_views): New function.
(Archive::get_view): Add aligned parameter. Change all callers.
* object.h (Object::get_view): Add aligned parameter. Change all
callers.
(Object::get_lasting_view): Likewise.
* fileread.cc (File_read::release): Don't call clear_views if
there are multiple objects.
* fileread.h (File_read::clear_uncached_views): New function.
* archive.cc (Add_archive_symbols::run): Call clear_uncached_views
on the archive.
2008-04-02 20:58:21 +00:00
Ian Lance Taylor
04bf70729d
PR gold/5986
...
Fix problems building gold with gcc 4.3.0.
* gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.
(gold_error_at_location, gold_warning_at_location): Use it.
* configure.ac: Check whether we can compile and use a template
function with a printf attribute.
* x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value
when jumping over bytes.
* object.cc: Instantiate Object::read_section_data.
* debug.h: Include <cstring>
* dwarf_reader.cc: Include <algorithm>
* main.cc: Include <cstring>.
* options.cc: Include <cstring>.
* output.cc: Include <cstring>.
* script.cc: Include <cstring>.
* script.h: Include <string>.
* symtab.cc: Include <cstring> and <algorithm>.
* target-select.cc: Include <cstring>.
* version.cc: Include <string>.
* testsuite/testmain.cc: Include <cstdlib>.
* configure, config.in: Rebuild.
2008-03-26 23:36:46 +00:00
Ian Lance Taylor
086a18414a
* options.cc: Include "demangle.h".
...
(parse_optional_string): New function.
(parse_long_option): Handle takes_optional_argument.
(parse_short_option): Update dash_z initializer. Handle
takes_optional_argument.
(General_options::General_options): Initialize do_demangle_.
(General_options::finalize): Set do_demangle_. Handle demangling
style.
* options.h (parse_optional_string): Declare.
(struct One_option): Add optional_arg field. Update constructor.
Update call constructor calls. Add takes_optional_argument
function.
(DEFINE_var): Add optional_arg__ parameter. Change all callers.
(DEFINE_optional_string): Define.
(General_options::demangle): Change from DEFINE_bool to
DEFINE_optional_string.
(General_options::no_demangle): New function.
(General_options::do_demangle): New function.
(General_options::set_do_demangle): New function.
(General_options::execstack_status_): Move definition to end of
class definition.
(General_options::static_): Likewise.
(General_options::do_demangle_): New field.
* object.cc (big_endian>::get_symbol_location_info): Call
Options::do_demangle, not Options::demangle.
* symtab.cc (demangle): Likewise.
2008-03-24 03:48:29 +00:00
Ian Lance Taylor
d1f003c610
Fix handling of RELA relative relocs against local symbols in merge
...
sections.
2008-03-16 23:51:19 +00:00
Ian Lance Taylor
ebdbb4583d
Update copyright years. Update language files.
2008-03-13 21:04:21 +00:00
Ian Lance Taylor
1650c4ff50
Combine read-only .eh_frame sections with read-write .eh_frame
...
sections.
2008-03-12 04:38:42 +00:00
Ian Lance Taylor
0dfbdef4c4
Support -d/--define-common.
2008-02-28 20:35:39 +00:00
Ian Lance Taylor
8851eccaec
From Craig Silverstein: Have Parameters point to General_options.
2008-02-28 00:18:24 +00:00
Ian Lance Taylor
7019cd2565
Implement -q/--emit-relocs.
2008-02-27 22:38:18 +00:00
Ian Lance Taylor
dceae3c154
Support dynamic relocations against local section symbols.
2008-02-12 00:28:48 +00:00
Ian Lance Taylor
88dd47ac00
Implement --just-symbols, including -R FILE. Fix symbol values when
...
doing a relocatable link.
2008-02-07 01:51:25 +00:00
Ian Lance Taylor
fbfba50887
Support creating empty output when there are no input objects.
2008-02-06 20:32:10 +00:00
Ian Lance Taylor
6a74a71947
Initial -r support.
2008-02-06 08:13:50 +00:00
Ian Lance Taylor
cb29561284
Reduce the number of system calls. Use readv instead of pread. Do
...
better handling of cached views.
2008-01-02 23:48:49 +00:00
Ian Lance Taylor
8d32f93595
Correct handling of non-section symbol in merged section. Avoid some
...
64-bit signed/unsigned warnings.
2007-12-21 23:08:25 +00:00
Ian Lance Taylor
a9a60db689
Speed up relocations against local symbols in merged sections.
2007-12-21 21:19:45 +00:00
Ian Lance Taylor
8383303e0a
Add section_size_type and section_offset_type, use them to replace a
...
lot of instances of off_t.
2007-12-18 00:48:04 +00:00
Ian Lance Taylor
17a1d0a9b2
Rewrite workqueue. This version eliminates the master thread, and
...
reduces the amount of locking required to find a new thread to run.
2007-12-14 19:00:21 +00:00
Ian Lance Taylor
f2619d6c3b
Initialize variable to avoid warning.
2007-12-06 06:03:00 +00:00
Ian Lance Taylor
7bf1f8020f
From Cary Coutant: More support for generating shared libraries.
2007-12-06 05:55:50 +00:00
Ian Lance Taylor
96803768f1
Compress all debug sections.
2007-12-01 06:34:12 +00:00
Ian Lance Taylor
a2b1aa12f7
From Craig Silverstein: Add support for --demangle.
2007-11-15 01:12:55 +00:00
Ian Lance Taylor
9a2d698415
Add heuristics for undefined symbol warnings.
2007-11-14 16:53:25 +00:00
Ian Lance Taylor
e2827e5f52
Warn about undefined references in shared libraries if we have seen
...
all the DT_NEEDED entries for that library.
2007-11-14 07:34:53 +00:00
Ian Lance Taylor
a55ce7febf
From Craig Silverstein: Rework debug info code a bit, add option for
...
ODR violations, add test case.
2007-11-14 01:03:01 +00:00
Ian Lance Taylor
24badc6562
From Craig Silverstein: rework DWARF reader code a bit.
2007-11-12 19:56:20 +00:00
Ian Lance Taylor
aed38d0694
From Craig Silverstein: Initialize got_relocs.
2007-11-09 23:56:32 +00:00
Ian Lance Taylor
4c50553d98
From Craig Silverstein: Use relocations in reporting error message
...
locations.
2007-11-09 23:16:54 +00:00
Ian Lance Taylor
730cdc88f7
Generate a complete exception frame header. Discard duplicate
...
exception frame information.
2007-11-09 07:00:15 +00:00
Ian Lance Taylor
e43872e995
From Craig Silverstein: Templatize the Dwarf reader.
2007-11-07 00:49:56 +00:00
Ian Lance Taylor
019cdb1a59
From Craig Silverstein: Don't crash if we see a file we don't recognize.
2007-11-07 00:31:32 +00:00
Ian Lance Taylor
5c2c6c957b
From Craig Silverstein: Add first version of generating error messages
...
with file name and line number.
2007-11-02 23:02:44 +00:00
Ian Lance Taylor
f7e2ee4820
Reworked from Andrew Chatham: report error locations.
2007-11-02 03:28:52 +00:00
Ian Lance Taylor
35cdfc9a87
Add support for PT_GNU_STACK.
2007-10-23 05:05:48 +00:00
Ian Lance Taylor
ad435a2465
Adjust linkonce symbol name algorithm to work for
...
.gnu.linkonce.t.__i686.get_pc_thunk.bx.
2007-10-14 07:27:10 +00:00
Ian Lance Taylor
75f2446ec3
Run all error handling through an Errors object. Delete output file
...
on error.
2007-10-14 06:49:14 +00:00
Ian Lance Taylor
27b7985a73
From Craig Silverstein: add some internationalization calls.
2007-10-14 04:06:18 +00:00
Ian Lance Taylor
cfd73a4e26
Add an option for Stringpools to not copy strings.
2007-10-12 06:06:34 +00:00
Ian Lance Taylor
9e2dcb779c
Implement -s and -S options which strip symbols.
2007-10-10 19:02:56 +00:00
Ian Lance Taylor
e727fa71af
Add support for local GOT offsets.
2007-10-08 07:22:21 +00:00
Ian Lance Taylor
063f12a825
Correct handling of addends in merged sections.
2007-10-06 05:40:44 +00:00
Ian Lance Taylor
f5c3f2256f
From Craig Silverstein: avoid some signed/unsigned warnings from gcc 4.2.
2007-10-02 20:52:18 +00:00
Ian Lance Taylor
9025d29d14
Put size and endianness in parameters.
2007-09-26 07:01:35 +00:00
Ian Lance Taylor
9eb9fa57c2
Add cache parameter to get_view. Discard uncached views on unlock.
...
Fix bug this exposed in archive armap symbol name handling.
2007-09-25 17:50:26 +00:00
Ian Lance Taylor
6cb15b7f89
Add licensing text to every source file.
2007-09-22 21:02:10 +00:00
Ian Lance Taylor
7e1edb9089
Add global parameters.
2007-09-21 07:20:01 +00:00
Ian Lance Taylor
cba134d613
From Cary Coutant: only check for a linkonce section if the SHF_GROUP
...
flag is clear.
2007-09-20 06:02:06 +00:00
Ian Lance Taylor
193a53d920
Add support for --enable-target to control which template
...
specializations we generate.
2007-09-04 20:00:53 +00:00
Ian Lance Taylor
b8e6aad960
Add support for SHF_MERGE sections.
2007-05-16 17:42:48 +00:00
Ian Lance Taylor
008db82ec1
Don't emit symbols seen only in dynamic object, don't read duplicate
...
dynamic object.
2006-12-06 06:28:56 +00:00