Fix support for indirect DIE attribute: we should store the actual
form of an indirect attribute (instead of DW_FORM_indirect) in the
attribute struct.

Submitted by:	Jonas Dieckelmann

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2966 95820547-d848-0410-985e-9ae8fe0fa350
Add support for i386 dynamic relocations. (work in progress)


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2967 95820547-d848-0410-985e-9ae8fe0fa350
Do not assume "strip all symbols" when strip(1) -x option is specified.

Ticket:	      #430
Reported by:  rsherloc

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2968 95820547-d848-0410-985e-9ae8fe0fa350
When stripping local symbols (option -x for strip(1)), do not strip
local debugging symbols.

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2969 95820547-d848-0410-985e-9ae8fe0fa350
Fixed option -X for strip and elfcopy: Remove compiler generated local
symbols when -X is specified.

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2970 95820547-d848-0410-985e-9ae8fe0fa350
Give a warning when symbol table does not exist while function
generate_symbols() is called.

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2971 95820547-d848-0410-985e-9ae8fe0fa350
Avoid calling malloc() or calloc() with 0 byte.

Submitted by: jtytgat
Ticket:	      #434

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2972 95820547-d848-0410-985e-9ae8fe0fa350
Do not dereference a NULL pointer in dwarf_add_line_entry() when
dwarf_lne_set_address() hasn't actually been called before.

Submitted by: jtytgat
Ticket:	      #435

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2973 95820547-d848-0410-985e-9ae8fe0fa350
Deal with unmatched DW_MACINFO_start_file/DW_MACINFO_end_file pairs
and avoid accessing file index out-of-bounds.

Submitted by: jtytgat
Ticket:	      #436

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2974 95820547-d848-0410-985e-9ae8fe0fa350
Fix a warning in libdwarf found by -Wmissing-variable-declarations.


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2975 95820547-d848-0410-985e-9ae8fe0fa350
Fix typo: the public API dwarf_child() should return DW_DLV_NO_ENTRY
instead of DW_DLE_NO_ENTRY when a child DIE is not found.


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2976 95820547-d848-0410-985e-9ae8fe0fa350
API dwarf_attrval_flag() should properly handle an attribute with
(DWARF4) form DW_FORM_flag_present which implicitly indicates the
presence of the attribute. Manual page is updated to reflect this
change.


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2977 95820547-d848-0410-985e-9ae8fe0fa350
Add a sanity check: The provided offset for the desired location list
should not exceed the size of the .debug_loc section.


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2978 95820547-d848-0410-985e-9ae8fe0fa350
* Allow API dwarf_loclist_n() and dwarf_loclist() to be called with
  attributes that have form DW_FORM_sec_offset.
* If the .debug_info section conforms to DWARF4, do not allow the value
  of attributes with form DW_FORM_data[48] to be used as section
  offset.


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2979 95820547-d848-0410-985e-9ae8fe0fa350
Remove trailing whitespace.


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2980 95820547-d848-0410-985e-9ae8fe0fa350
In `libelftc`/`elftc_copyfile()`:
- Fix a memory leak in an error handling path.
- Improve the logic dealing with the case where a prior call to
  `mmap(2)` failed.

Submitted by:	John Tytgat <jtytgat>
Ticket:		#437

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2981 95820547-d848-0410-985e-9ae8fe0fa350
Fix warning found by Clang's -Wmissing-variable-declarations.

Reviewed by:	jkoshy


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2982 95820547-d848-0410-985e-9ae8fe0fa350
Do not allocate more memory than needed.

Submitted by:	jtytgat
Ticket:	  #433


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2983 95820547-d848-0410-985e-9ae8fe0fa350
Fix the build on NetBSD 6.1: include `<unistd.h>` for the
prototype for `close(2)`.


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2984 95820547-d848-0410-985e-9ae8fe0fa350
Augment the 'clobber' target to run optional OS-specific actions.

Supply a do-nothing 'os-specific-clobber' target as a default.


git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@2985 95820547-d848-0410-985e-9ae8fe0fa350