This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Rebased & reworked: [Patch mach-o 1/3] section directives needed to support GCC



On 13 Dec 2011, at 14:15, Tristan Gingold wrote:



On Dec 13, 2011, at 2:45 PM, Iain Sandoe wrote:


rebased to use objdump -P.
plus changes per your comments (with some specific observations as below).

Ok. Should I commit it ?


Tristan.


On 13 Dec 2011, at 09:44, Tristan Gingold wrote:
See enclosing comments,

+     0 entry.  */
+  _bfd_stringtab_add (strtab, "", TRUE, FALSE);
+

Ah, yes. BTW I think that the string is padded to 4 or 8 bytes too.

not for XCode 3.1.4 or 3.2.5 (I don't have XC 4.x yet) -
however, I did notice it should not be emitted unless there is at least one symbol - amended.


+ *input_line_pointer = '\0'; /* make a temp string. */
+ as_warn (_("the %s name '%s' exceeds 16 characters, truncated"),
+ msg, namstart);

Warning or error ?
thanks, it should be error - to match system tools, amended.

+  /* 10 */ {".picsymbol_stub2", 25, 0}, /* X86 - extension */
+  /* 11 */ {".picsymbol_stub3", 5, 0}, /* X86 - extension  */
+};

Should we #if/#endif arch extensions ?

.. as it is, it allows us to make a more specific and User-friendly error message than
the generic "Unknown pseudo-op"... but if you would prefer to ifdef - I think it should
be in the main table below - or we'll have to keep track of changing indices.


static symbolS *

Usually we let a blank line between the comment and the definition. There are many occurrences and I am not sure the existing code always follow this rule.

I've changed all the occurances in this file, will try to catch others as I go.


+ { "picsymbol_stub2", obj_mach_o_opt_tgt_section, 4}, /* extension. */
+ { "picsymbol_stub3", obj_mach_o_opt_tgt_section, 4}, /* extension. */

#if/#endif arch specific pseudo ?


here if at all - but comment as above.

+ (BFDSEC)->used_by_bfd = (MACHOSEC)
+
+#define OBJ_MACH_O_GET_BACKEND_SECT_DATA(ABFD, BFDSEC) (BFDSEC)- >used_by_bfd

Doesn't this duplicate mach-o.h: bfd_mach_o_get_mach_o_section ?

removed.


========
[…]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]