{"id":685,"date":"2010-11-25T08:03:28","date_gmt":"2010-11-24T22:03:28","guid":{"rendered":"http:\/\/brnz.org\/hbr\/?p=685"},"modified":"2010-12-02T15:41:02","modified_gmt":"2010-12-02T05:41:02","slug":"assembly-primer-part-5-data-types","status":"publish","type":"post","link":"https:\/\/brnz.org\/hbr\/?p=685","title":{"rendered":"Assembly Primer Part 5 &#8212; Data Types"},"content":{"rendered":"<p>These are my notes for where I can see both PPC and SPU varying from ia32, as presented in the video\u00a0<a href=\"http:\/\/www.securitytube.net\/Assembly-Primer-for-Hackers-%28Part-5%29-Data-Types-video.aspx\">Part 5 \u2014 Data Types<\/a>.\u00a0  There&#8217;s not a lot to be said about this one, so there&#8217;s just the one post for both PPC and SPU architectures.<\/p>\n<p>The main problem with assembling the provided <a href=\"http:\/\/code.securitytube.net\/VariableDemo.s\">VariableDemo.s<\/a> is that gas doesn&#8217;t seem to like the .bss section for either PPC or SPU, producing an error.\u00a0 To be able to assemble this file on these architectures, I removed the .bss line and (obviously) removed (replaced) the ia32 asm instructions.\u00a0 objdump shows that &#8220;.comm LargeBuffer 10000&#8221; is placed in .bss, as intended.<\/p>\n<p>(At this point, I&#8217;m quite out of my depth as to why this difference between the architectures exists &#8212; if someone can enlighten me, that&#8217;d be great :)<\/p>\n<p>I was interested to see that gdb has no problem accessing the unaligned variables on the SPU.\u00a0 It&#8217;s worth noting that the assembler is quite happy to let you place data wherever you like (with great power comes great etc.).\u00a0 And I think I need to take a closer look at the .align directive.<\/p>\n<h3>Previous assembly primer notes\u2026<\/h3>\n<p>Part 1 \u2014 System Organization \u2014\u00a0<a href=\"?p=631\">PPC<\/a> \u2014\u00a0<a href=\"?p=632\">SPU<\/a><br \/>\nPart 2 \u2014 Memory Organisation \u2014 <a href=\"?p=633\">SPU<\/a><br \/>\nPart 3 \u2014 GDB Usage Primer \u2014 <a href=\"?p=634\">PPC &amp; SPU<\/a><br \/>\nPart 4 \u2014 Hello World \u2014 <a href=\"https:\/\/brnz.org\/hbr\/?p=635\">PPC<\/a> \u2014 <a href=\"?p=634\">SPU<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>These are my notes for where I can see both PPC and SPU varying from ia32, as presented in the video\u00a0Part 5 \u2014 Data Types.\u00a0 There&#8217;s not a lot to be said about this one, so there&#8217;s just the one post for both PPC and SPU architectures. The main problem with assembling the provided VariableDemo.s &hellip; <a href=\"https:\/\/brnz.org\/hbr\/?p=685\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Assembly Primer Part 5 &#8212; Data Types&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,26],"tags":[38,39,40],"_links":{"self":[{"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/posts\/685"}],"collection":[{"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=685"}],"version-history":[{"count":6,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/posts\/685\/revisions"}],"predecessor-version":[{"id":789,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/posts\/685\/revisions\/789"}],"wp:attachment":[{"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}